From: przemek Date: Wed, 12 Oct 2011 12:51:21 +0000 (+0200) Subject: Fixes to key handling X-Git-Tag: xonotic-v0.6.0~40^2~17^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0822ebd5f8367f4087ccf04129d22519c6ac93ac;p=xonotic%2Fxonotic-data.pk3dir.git Fixes to key handling --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 4a2de0613..60f457362 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -860,6 +860,9 @@ void PutClientInServer (void) WriteByte(MSG_ONE, SVC_SETVIEW); WriteEntity(MSG_ONE, self); } + + // reset player keys + self.itemkeys = 0; // player is dead and becomes observer // FIXME fix LMS scoring for new system diff --git a/qcsrc/server/item_key.qc b/qcsrc/server/item_key.qc index 55f71e3bc..e26d6fe80 100644 --- a/qcsrc/server/item_key.qc +++ b/qcsrc/server/item_key.qc @@ -46,7 +46,7 @@ void spawn_item_key(float key_code) { self.itemkeys = key_code; precache_model(self.model); - if (self.spawnflags & 1) + if (self.spawnflags & 1) // FLOATING self.noalign = 1; if (self.noalign) @@ -105,7 +105,7 @@ void spawnfunc_item_key1(void) { }; /*QUAKED item_key2 (0 .5 .8) (-16 -16 -24) (16 16 32) FLOATING -GOLDEN key. +GOLD key. -----------KEYS------------ colormod: color of the key (default: '1 .9 0'). message: message to print when player picks up this key. diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index 568d2f5ae..8cb876782 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -934,7 +934,7 @@ float door_check_keys(void) { if (p.key_door_messagetime <= time) { play2(other, "misc/talk.wav"); centerprint(other, "You don't have the silver key!"); - p.wait = p.key_door_messagetime + 2; + p.key_door_messagetime = time + 2; } return FALSE; } else {