mirror of
https://github.com/yquake2/xatrix.git
synced 2025-02-23 04:11:28 +00:00
Merge pull request #67 from De-Seppe/master
Feature request : add cvar to disable machine gun recoil in single player #741 (xatrix)
This commit is contained in:
commit
e67c63a03e
4 changed files with 4 additions and 1 deletions
|
@ -67,6 +67,7 @@ cvar_t *sv_maplist;
|
|||
cvar_t *gib_on;
|
||||
|
||||
cvar_t *aimfix;
|
||||
cvar_t *g_machinegun_norecoil;
|
||||
|
||||
void SpawnEntities(char *mapname, char *entities, char *spawnpoint);
|
||||
void ClientThink(edict_t *ent, usercmd_t *cmd);
|
||||
|
|
|
@ -541,6 +541,7 @@ extern cvar_t *flood_waitdelay;
|
|||
extern cvar_t *sv_maplist;
|
||||
|
||||
extern cvar_t *aimfix;
|
||||
extern cvar_t *g_machinegun_norecoil;
|
||||
|
||||
#define world (&g_edicts[0])
|
||||
|
||||
|
|
|
@ -1345,7 +1345,7 @@ Machinegun_Fire(edict_t *ent)
|
|||
ent->client->kick_angles[0] = ent->client->machinegun_shots * -1.5;
|
||||
|
||||
/* raise the gun as it is firing */
|
||||
if (!deathmatch->value)
|
||||
if (!(deathmatch->value || g_machinegun_norecoil->value))
|
||||
{
|
||||
ent->client->machinegun_shots++;
|
||||
|
||||
|
|
|
@ -250,6 +250,7 @@ InitGame(void)
|
|||
|
||||
/* others */
|
||||
aimfix = gi.cvar("aimfix", "0", CVAR_ARCHIVE);
|
||||
g_machinegun_norecoil = gi.cvar("g_machinegun_norecoil", "0", CVAR_ARCHIVE);
|
||||
|
||||
/* items */
|
||||
InitItems ();
|
||||
|
|
Loading…
Reference in a new issue