diff --git a/src/game/server/hooks.cpp b/src/game/server/hooks.cpp index d8e6c9bbb..7fb79236b 100644 --- a/src/game/server/hooks.cpp +++ b/src/game/server/hooks.cpp @@ -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); } } diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index 02e92c36a..b31c4d2fc 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -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(); } diff --git a/src/game/server/player.hpp b/src/game/server/player.hpp index 24713c930..e88ce8589 100644 --- a/src/game/server/player.hpp +++ b/src/game/server/player.hpp @@ -20,6 +20,7 @@ public: int color_body; int color_feet; + int respawn_tick; // bool spawning; int client_id;