Skip to content

Commit

Permalink
const qualify damaged/damageeffect()
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Jul 3, 2024
1 parent e25e4e8 commit 5f54d5f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ namespace game

VARP(hitsound, 0, 0, 1);

void damaged(int damage, gameent *d, gameent *actor, bool local)
void damaged(int damage, gameent *d, const gameent *actor, bool local)
{
if((d->state!=ClientState_Alive && d->state != ClientState_Lagged && d->state != ClientState_Spawning) || intermission)
{
Expand Down
4 changes: 2 additions & 2 deletions game/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ namespace game
extern void startgame();
extern void spawnplayer(gameent *);
extern void deathstate(gameent *d, bool restore = false);
extern void damaged(int damage, gameent *d, gameent *actor, bool local = true);
extern void damaged(int damage, gameent *d, const gameent *actor, bool local = true);
extern void killed(gameent *d, const gameent *actor);
extern void timeupdate(int timeremain);
extern void msgsound(int n, physent *d = nullptr);
Expand Down Expand Up @@ -1007,7 +1007,7 @@ namespace game
extern void shoteffects(int atk, const vec &from, const vec &to, gameent *d, bool local, int id, int prevaction);
extern void explode(bool local, gameent *owner, const vec &v, const vec &vel, dynent *safe, int dam, int atk);
extern void explodeeffects(int atk, const gameent *d, bool local, int id = 0);
extern void damageeffect(int damage, gameent *d, bool thirdperson = true);
extern void damageeffect(int damage, const gameent *d, bool thirdperson = true);
extern float intersectdist;
extern bool intersect(dynent *d, const vec &from, const vec &to, float margin = 0, float &dist = intersectdist);
extern dynent *intersectclosest(const vec &from, const vec &to, gameent *at, float margin = 0, float &dist = intersectdist);
Expand Down
2 changes: 1 addition & 1 deletion game/weapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ namespace game

VARP(blood, 0, 1, 1);

void damageeffect(int damage, gameent *d, bool thirdperson)
void damageeffect(int damage, const gameent *d, bool thirdperson)
{
vec p = d->o;
p.z += 0.6f*(d->eyeheight + d->aboveeye) - d->eyeheight;
Expand Down

0 comments on commit 5f54d5f

Please sign in to comment.