]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fixes to key handling
authorprzemek <przemek@7bulls.com>
Wed, 12 Oct 2011 12:51:21 +0000 (14:51 +0200)
committerprzemek <przemek@7bulls.com>
Wed, 12 Oct 2011 12:51:21 +0000 (14:51 +0200)
qcsrc/server/cl_client.qc
qcsrc/server/item_key.qc
qcsrc/server/t_plats.qc

index 4a2de06131ffe3ad6bba6c06ba9269b570bbd411..60f457362c3786ec39a28241ac1854d5da3f4810 100644 (file)
@@ -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
index 55f71e3bc3444ba1db64077c333beb5bf4b40362..e26d6fe801830ac6b1c19a523d147e001a73b2a6 100644 (file)
@@ -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.
index 568d2f5aee9aa3ce80e9c184386e317a78f14743..8cb87678223c0c6348c875af14c4d773366997bb 100644 (file)
@@ -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 {