• 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!

C++ convert c++ overspawn code for tfs 1.5

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,990
Solutions
9
Reaction score
334
Location
Chile
Hello i found this c++ code for tfs 0.4 in this thread
Lua:
void Monster::onThink(uint32_t interval)
{
    Creature::onThink(interval);
    if(despawn())
    {
        if(spawn)
        {
            spawn->removeMonster(this);
            spawn->startEvent();
            spawn = NULL;
            masterRadius = -1;
        }
    }

    updateIdleStatus();
    if(isIdle)
        return;
wonder if someone could convert it for tfs 1.5 please.
 
Hello i found this c++ code for tfs 0.4 in this thread
Lua:
void Monster::onThink(uint32_t interval)
{
    Creature::onThink(interval);
    if(despawn())
    {
        if(spawn)
        {
            spawn->removeMonster(this);
            spawn->startEvent();
            spawn = NULL;
            masterRadius = -1;
        }
    }

    updateIdleStatus();
    if(isIdle)
        return;
wonder if someone could convert it for tfs 1.5 please.
C++:
void Monster::onThink(uint32_t interval)
{
    Creature::onThink(interval);

    if (despawn())
    {
        if (spawn)
        {
            spawn->removeMonster(this);
            spawn->startEvent();
            spawn = nullptr;
            masterRadius = -1;
        }
    }

    updateIdleStatus();
    if (isIdle)
        return;
}
Only the NULL pointer type has been replaced with the nullptr value, as TFS 1.5 uses nullptr to indicate a null pointer.
 
Back
Top