added delay before respawn when using the kill-command; provided and tested by scosu; ticket #463

This commit is contained in:
Dominik Geyer 2008-10-17 15:38:36 +00:00
parent a4e922cf5a
commit eb47aa385b
3 changed files with 4 additions and 2 deletions

View file

@ -315,7 +315,7 @@ void mods_message(int msgtype, int client_id)
return;
p->last_kill = time_get();
p->respawn_tick = server_tick()+server_tickspeed()*3;
p->kill_character(); //(client_id, -1);
}
}

View file

@ -9,6 +9,7 @@ MACRO_ALLOC_POOL_ID_IMPL(PLAYER, MAX_CLIENTS)
PLAYER::PLAYER(int client_id)
{
respawn_tick = server_tick();
character = 0;
this->client_id = client_id;
}
@ -56,7 +57,7 @@ void PLAYER::tick()
character = 0;
}
}
else if(spawning)
else if(spawning && respawn_tick <= server_tick())
try_respawn();
}

View file

@ -20,6 +20,7 @@ public:
int color_body;
int color_feet;
int respawn_tick;
//
bool spawning;
int client_id;