]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/atheros/item_keys'
authorRudolf Polzer <divverent@xonotic.org>
Mon, 24 Oct 2011 09:54:50 +0000 (11:54 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 24 Oct 2011 09:54:50 +0000 (11:54 +0200)
1  2 
qcsrc/server/cl_client.qc
qcsrc/server/defs.qh

index 299df0d082ef84ee9d06d001f4d3b7f29fc77046,9e8539039a307c496a449ca8cac4365f34a45a36..de4c7431d5aafad3db68fe68f1da5e7ad5208070
@@@ -861,6 -861,9 +861,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
@@@ -2777,7 -2780,7 +2780,7 @@@ void PlayerPreThink (void
  
        MUTATOR_CALLHOOK(PlayerPreThink);
  
 -      if(!self.cvar_cl_newusekeysupported)
 +      if(!self.cvar_cl_newusekeysupported) // FIXME remove this - it was a stupid idea to begin with, we can JUST use the button
        {
                if(self.BUTTON_USE && !self.usekeypressed)
                        PlayerUseKey();
diff --combined qcsrc/server/defs.qh
index 5e5c8c7ba6f089720458b5526292b18f0ed5c9b9,2f81b83dc7418c49dec4fce818a933cff781ee67..b84d03164d312d8c2b3b410bb8c86a602bb1fca0
@@@ -246,6 -246,12 +246,12 @@@ float alreadychangedlevel
  
  .float runes;
  
+ // Keys player is holding
+ .float itemkeys;
+ // message delay for func_door locked by keys and key locks
+ // this field is used on player entities
+ .float key_door_messagetime;
  
  .float version;
  
@@@ -315,7 -321,6 +321,7 @@@ float default_weapon_alpha
  .float cvar_cl_handicap;
  .float cvar_cl_playerdetailreduction;
  .float cvar_cl_clippedspectating;
 +.float cvar_cl_autoscreenshot;
  .float cvar_cl_movement_track_canjump;
  .float cvar_cl_newusekeysupported;
  
@@@ -663,3 -668,4 +669,4 @@@ float serverflags
  .float misc_bulletcounter;    // replaces uzi & hlac bullet counter.
  
  void PlayerUseKey();