Skip to content

Commit

Permalink
Merge pull request #1286 from newbytf/dev-cur
Browse files Browse the repository at this point in the history
Dev cur
  • Loading branch information
newbytf authored Jan 19, 2024
2 parents 8c0ce87 + db7bb2d commit 8e70910
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion share/animate.qc
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ void FO_SetClientThink(void() func, float offset, float override = TRUE) {
}

void client_anim_frames(void() parent_thunk, void() extra, anim_t* anim) {
if (self.deadflag)
if (self.deadflag) {
player_run();
return;
}

float tidx = *thinkindex()++ - 1;

Expand Down
11 changes: 7 additions & 4 deletions share/weapons.qc
Original file line number Diff line number Diff line change
Expand Up @@ -471,18 +471,21 @@ float self_class();
Slot self_current_slot();
float* self_clip_fired(Slot slot);

float FO_PlayerCurrentWeapon(entity player) {
float FO_CurrentWeapon() {
FO_WeapInfo* wi = FO_SlotWeapInfo(self_class(), self_current_slot());
if (!wi)
return WEAP_NONE;
return wi->weapon;
}

inline float FO_CurrentWeapon() {
return FO_PlayerCurrentWeapon(self);
#ifdef SSQC
float FO_PlayerCurrentWeapon(entity player) {
FO_WeapInfo* wi = FO_SlotWeapInfo(player.playerclass, player.current_slot);
if (!wi)
return WEAP_NONE;
return wi->weapon;
}

#ifdef SSQC
struct FO_WeapState {
float weapon;
Slot slot;
Expand Down

0 comments on commit 8e70910

Please sign in to comment.