• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

TFS 1.X+ Explaining of some source lines

Mjmackan

Mapper ~ Writer
Joined
Jul 18, 2009
Messages
1,477
Solutions
18
Reaction score
195
Location
Sweden
USING: TFS 1.3
Anyone care to explain these? I searched around the lines somewhat in the sources but didnt understand the meaning behind it.
I'm trying to accomplish faster reaction from the monsters while pathing but either they make this classic 'stand still' then turn around move, if i change the 'EVENT_CHECK_CREATURE_INTERVAL' to anything lower than it is (aka 100ms?), you seem to break the system and some monsters just stand still but you do get the faster response in pathing from those monsters who still moves. I'm sure there is thoughts and ideas about this, but what? :D

Here are the lines(from creature.h) that i want explained:
C++:
struct FindPathParams {
    bool fullPathSearch = true;
    bool clearSight = true;
    bool allowDiagonal = true;
    bool keepDistance = false;
    int32_t maxSearchDist = 0;
    int32_t minTargetDist = -1;
    int32_t maxTargetDist = -1;
};

static constexpr int32_t EVENT_CREATURECOUNT = 10;
static constexpr int32_t EVENT_CREATURE_THINK_INTERVAL = 1000;
static constexpr int32_t EVENT_CHECK_CREATURE_INTERVAL = (EVENT_CREATURE_THINK_INTERVAL / EVENT_CREATURECOUNT);
 
When you open it in visual studio, you can hover over it to see the value or right click to:
  • find all references
  • go to declaration
  • go to definition
  • possibly more

If you're on linux some other IDE should also have these features.
 
Back
Top