Merge client/input.qc and server/input.qc into shared/input.qc

This commit is contained in:
Marco Cawthorne 2021-03-09 11:55:05 +01:00
parent 01b8baf3d8
commit 5003c05c79
5 changed files with 17 additions and 23 deletions

View file

@ -20,7 +20,6 @@
../../../src/gs-entbase/shared.src
../shared/include.src
../../../valve/src/client/predict.qc
init.qc
../../../valve/src/client/player.qc
../../../valve/src/client/entities.qc
@ -31,7 +30,6 @@ init.qc
../../../valve/src/client/hud.qc
hud_weaponselect.qc
../../../valve/src/client/scoreboard.qc
../../../valve/src/client/input.qc
../../../base/src/client/modelevent.qc
../../../src/client/include.src

View file

@ -17,3 +17,5 @@
#include "../../../valve/src/server/gamerules.h"
#include "gamerules_ctf.h"
#include "../../../valve/src/server/items.h"
#include "../../../valve/src/server/flashlight.h"
#include "../../../valve/src/server/player.h"

View file

@ -15,10 +15,11 @@
../../../src/gs-entbase/server.src
../../../src/gs-entbase/shared.src
../shared/include.src
defs.h
../shared/include.src
../../../valve/src/server/monster_apache.qc
../../../valve/src/server/monster_alien_controller.qc
../../../valve/src/server/monster_alien_grunt.qc
@ -86,7 +87,6 @@ server.qc
../../../valve/src/server/flashlight.qc
../../../base/src/server/modelevent.qc
../../../valve/src/server/input.qc
../../../valve/src/server/spawn.qc
../../../src/server/include.src

View file

@ -43,4 +43,5 @@ w_penguin.qc
w_shockrifle.qc
weapons.qc
../../../valve/src/shared/weapon_common.qc
input.qc
#endlist

View file

@ -17,16 +17,7 @@
void
Game_Input(void)
{
if (input_buttons & INPUT_BUTTON0) {
Weapons_Primary();
} else if (input_buttons & INPUT_BUTTON4) {
Weapons_Reload();
} else if (input_buttons & INPUT_BUTTON3) {
Weapons_Secondary();
} else {
Weapons_Release();
}
#ifdef SERVER
if (input_buttons & INPUT_BUTTON5) {
Player_UseDown();
} else {
@ -68,16 +59,18 @@ Game_Input(void)
Weapons_AddItem(pl, WEAPON_SNIPERRIFLE, -1);
Weapons_AddItem(pl, WEAPON_DISPLACER, -1);
}
if (self.impulse == 102) {
// Respawn all the entities
for (entity a = world; (a = findfloat(a, g::identity, 1));) {
CBaseEntity caw = (CBaseEntity)a;
caw.Respawn();
}
bprint(PRINT_HIGH, "Respawning all map entities...\n");
}
}
self.impulse = 0;
#endif
if (input_buttons & INPUT_BUTTON0) {
Weapons_Primary();
} else if (input_buttons & INPUT_BUTTON4) {
Weapons_Reload();
} else if (input_buttons & INPUT_BUTTON3) {
Weapons_Secondary();
} else {
Weapons_Release();
}
}