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

regarding prediction.
This commit is contained in:
Marco Cawthorne 2021-03-09 11:51:13 +01:00
parent bdfd613daa
commit 9c4f63ccf2
8 changed files with 25 additions and 36 deletions

View File

@ -19,7 +19,6 @@ defs.h
../../../src/gs-entbase/shared.src
../shared/include.src
predict.qc
init.qc
player.qc
entities.qc
@ -30,7 +29,6 @@ obituary.qc
hud.qc
hud_weaponselect.qc
scoreboard.qc
input.qc
../../../base/src/client/modelevent.qc
../../../src/client/include.src

View File

@ -16,3 +16,5 @@
#include "gamerules.h"
#include "items.h"
#include "flashlight.h"
#include "player.h"

View File

@ -14,12 +14,4 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
void
GamePredict_PreFrame(player pl)
{
}
void
GamePredict_PostFrame(player pl)
{
}
void Flashlight_Toggle(void);

View File

@ -14,16 +14,5 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
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();
}
}
void Player_UseDown(void);
void Player_UseUp(void);

View File

@ -14,10 +14,11 @@
../../../src/gs-entbase/server.src
../../../src/gs-entbase/shared.src
../shared/include.src
defs.h
../shared/include.src
monster_apache.qc
monster_alien_controller.qc
monster_alien_grunt.qc
@ -81,7 +82,6 @@ rules.qc
flashlight.qc
../../../base/src/server/modelevent.qc
input.qc
spawn.qc
../../../src/server/include.src

View File

@ -33,4 +33,5 @@ w_snark.qc
w_tripmine.qc
weapons.qc
weapon_common.qc
input.qc
#endlist

View File

@ -23,6 +23,7 @@ Handles impulse and whatnot
*/
void Game_Input(void)
{
#ifdef SERVER
CGameRules rules = (CGameRules)g_grMode;
if (rules.m_iIntermission) {
@ -30,16 +31,6 @@ void Game_Input(void)
return;
}
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();
}
if (input_buttons & INPUT_BUTTON5) {
Player_UseDown();
} else {
@ -105,4 +96,15 @@ void Game_Input(void)
}
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();
}
}

View File

@ -40,6 +40,11 @@ typedef struct
void(int, vector, float) hudpic;
} weapon_t;
void Weapons_Primary(void);
void Weapons_Secondary(void);
void Weapons_Reload(void);
void Weapons_Release(void);
float Weapons_GetAim(int);
void Weapons_Reload(void);
void Weapons_DrawCrosshair(void);