fix: bad maxspeed after respawn with csdm (ref #482)
fix: free for all mode has no friends or foes chat: disable dead chat on csdm
This commit is contained in:
parent
4d82de8375
commit
948b441541
11 changed files with 119 additions and 64 deletions
33
inc/engine.h
33
inc/engine.h
|
|
@ -398,6 +398,39 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
// reference some game/mod cvars for access
|
||||
class ConVarRef final : public NonCopyable {
|
||||
private:
|
||||
cvar_t *ptr_ {};
|
||||
String name_ {};
|
||||
bool checked_ {};
|
||||
|
||||
public:
|
||||
ConVarRef (StringRef name) : name_ (name) {}
|
||||
~ConVarRef () = default;
|
||||
|
||||
public:
|
||||
bool exists () {
|
||||
if (checked_ && !ptr_) {
|
||||
return false;
|
||||
}
|
||||
checked_ = true;
|
||||
ptr_ = engfuncs.pfnCVarGetPointer (name_.chars ());
|
||||
|
||||
return ptr_ != nullptr;
|
||||
}
|
||||
|
||||
template <typename U = float> U value () {
|
||||
return exists () ? static_cast <U> (ptr_->value) : static_cast <U> (0);
|
||||
}
|
||||
|
||||
void set (StringRef value) {
|
||||
if (exists ()) {
|
||||
engfuncs.pfnCvar_DirectSet (ptr_, value.chars ());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// simplify access for console variables
|
||||
class ConVar final : public NonCopyable {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -655,7 +655,7 @@ public:
|
|||
int m_ammo[MAX_AMMO_SLOTS] {}; // total ammo amounts
|
||||
|
||||
bool m_isVIP {}; // bot is vip?
|
||||
bool m_notKilled {}; // has the player been killed or has he just respawned
|
||||
bool m_isAlive {}; // has the player been killed or has he just respawned
|
||||
bool m_notStarted {}; // team/class not chosen yet
|
||||
bool m_ignoreBuyDelay {}; // when reaching buyzone in the middle of the round don't do pauses
|
||||
bool m_inBombZone {}; // bot in the bomb zone or not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue