X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator%2Fgamemode_cts.qc;h=8e7512eb6965d42a7e7e4b88bea02bfcd690189d;hb=050fb0011ae5fb2b36c7c7f3d560f9453807a8ab;hp=ee8c221e5b9184fdbfab1ad2c38f5acd80a36cb3;hpb=907f3aacb38cd5d3bb8ad66e3799bdf2627e5f53;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/mutator/gamemode_cts.qc b/qcsrc/server/mutators/mutator/gamemode_cts.qc index ee8c221e5..8e7512eb6 100644 --- a/qcsrc/server/mutators/mutator/gamemode_cts.qc +++ b/qcsrc/server/mutators/mutator/gamemode_cts.qc @@ -98,8 +98,8 @@ MUTATOR_HOOKFUNCTION(cts, PlayerPhysics) // ensure nothing EVIL is being done (i.e. div0_evade) // this hinders joystick users though // but it still gives SOME analog control - wishvel.x = fabs(player.movement.x); - wishvel.y = fabs(player.movement.y); + wishvel.x = fabs(CS(player).movement.x); + wishvel.y = fabs(CS(player).movement.y); if(wishvel.x != 0 && wishvel.y != 0 && wishvel.x != wishvel.y) { wishvel.z = 0; @@ -107,32 +107,32 @@ MUTATOR_HOOKFUNCTION(cts, PlayerPhysics) if(wishvel.x >= 2 * wishvel.y) { // pure X motion - if(player.movement.x > 0) - player.movement_x = wishspeed; + if(CS(player).movement.x > 0) + CS(player).movement_x = wishspeed; else - player.movement_x = -wishspeed; - player.movement_y = 0; + CS(player).movement_x = -wishspeed; + CS(player).movement_y = 0; } else if(wishvel.y >= 2 * wishvel.x) { // pure Y motion - player.movement_x = 0; - if(player.movement.y > 0) - player.movement_y = wishspeed; + CS(player).movement_x = 0; + if(CS(player).movement.y > 0) + CS(player).movement_y = wishspeed; else - player.movement_y = -wishspeed; + CS(player).movement_y = -wishspeed; } else { // diagonal - if(player.movement.x > 0) - player.movement_x = M_SQRT1_2 * wishspeed; + if(CS(player).movement.x > 0) + CS(player).movement_x = M_SQRT1_2 * wishspeed; else - player.movement_x = -M_SQRT1_2 * wishspeed; - if(player.movement.y > 0) - player.movement_y = M_SQRT1_2 * wishspeed; + CS(player).movement_x = -M_SQRT1_2 * wishspeed; + if(CS(player).movement.y > 0) + CS(player).movement_y = M_SQRT1_2 * wishspeed; else - player.movement_y = -M_SQRT1_2 * wishspeed; + CS(player).movement_y = -M_SQRT1_2 * wishspeed; } } } @@ -238,7 +238,7 @@ MUTATOR_HOOKFUNCTION(cts, PutClientInServer) if(IS_PLAYER(player)) if(!game_stopped) { - if(player.killcount == FRAGS_SPECTATOR /* initial spawn */ || g_race_qualifying) // spawn + if(CS(player).killcount == FRAGS_SPECTATOR /* initial spawn */ || g_race_qualifying) // spawn race_PreparePlayer(player); else // respawn race_RetractPlayer(player);