summaryrefslogtreecommitdiff
path: root/src/fpsgame/weapon.cpp
diff options
context:
space:
mode:
authorxolatile2025-08-17 18:28:28 +0200
committerxolatile2025-08-17 18:28:28 +0200
commitbffe8d11bd1dfec49280fb64a17f0ae529ac3f5d (patch)
tree9f4f7b6f5003585e5a170bd55ccaa335b8f26f90 /src/fpsgame/weapon.cpp
parentbec4167d29a68efd0cd2da36143e7f1c78a119a0 (diff)
downloadxolatile-badassbug-master.tar.xz
xolatile-badassbug-master.tar.zst
Compiles, removed a lot of code, do not run it...HEADmaster
Diffstat (limited to 'src/fpsgame/weapon.cpp')
-rw-r--r--src/fpsgame/weapon.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/fpsgame/weapon.cpp b/src/fpsgame/weapon.cpp
index 30d2da8..4c85a36 100644
--- a/src/fpsgame/weapon.cpp
+++ b/src/fpsgame/weapon.cpp
@@ -408,14 +408,13 @@ namespace game {
else p.o = v;
}
}
- extern int chainsawhudgun;
VARP(muzzleflash, 0, 1, 1);
VARP(muzzlelight, 0, 1, 1);
void shoteffects(int gun, const vec &from, const vec &to, fpsent *d, bool local, int id, int prevaction) { // create visual effect from a shot {
int sound = guns[gun].sound, pspeed = 25;
switch(gun) {
case GUN_FIST:
- if(d->type==ENT_PLAYER && chainsawhudgun) sound = S_CHAINSAW_ATTACK;
+ if(d->type==ENT_PLAYER) sound = S_CHAINSAW_ATTACK;
break;
case GUN_SG: {
if(!local) createrays(gun, from, to);
@@ -613,7 +612,7 @@ namespace game {
}
pitch = -bnc.roll;
if(bnc.bouncetype==BNC_GRENADE)
- rendermodel(&bnc.light, "projectiles/grenade", ANIM_MAPMODEL|ANIM_LOOP, pos, yaw, pitch, MDL_CULL_VFC|MDL_CULL_OCCLUDED|MDL_LIGHT|MDL_LIGHT_FAST|MDL_DYNSHADOW);
+ rendermodel(&bnc.light, "projectiles/grenade", ANIM_MAPMODEL|ANIM_LOOP, pos, yaw, pitch, MDL_CULL_VFC|MDL_CULL_OCCLUDED|MDL_LIGHT|MDL_LIGHT_FAST);
else {
const char *mdl = NULL;
int cull = MDL_CULL_VFC|MDL_CULL_DIST|MDL_CULL_OCCLUDED;
@@ -643,7 +642,7 @@ namespace game {
int gun = -1;
switch(d->attacksound) {
case S_CHAINSAW_ATTACK:
- if(chainsawhudgun) gun = GUN_FIST;
+ gun = GUN_FIST;
break;
default:
return;
@@ -660,7 +659,7 @@ namespace game {
int sound = -1, radius = 0;
if(d->clientnum >= 0 && d->state == CS_ALIVE) switch(d->gunselect) {
case GUN_FIST:
- if(chainsawhudgun && d->attacksound < 0) {
+ if(d->attacksound < 0) {
sound = S_CHAINSAW_IDLE;
radius = 50;
}
@@ -711,9 +710,10 @@ namespace game {
/// Rough accuracy code, client-side only.
int pwshotsfired [NUMGUNS] = { 0 };
-int pwshotshit [NUMGUNS] = { 0 };
+int pwshotshit [NUMGUNS] = { 0 };
int pwdamagedealt [NUMGUNS] = { 0 };
-int pwaccuracy [NUMGUNS] = { 0 };
+int pwaccuracy [NUMGUNS] = { 0 };
+
int pwavgaccuracy = 0;
void pwshot(int gun) {