fix: breakable headache (ref #660)
fix: bots firing rates on short distances (ref #658)
This commit is contained in:
parent
e717710bd1
commit
c07d02c14e
9 changed files with 157 additions and 53 deletions
|
|
@ -62,6 +62,7 @@ void Game::levelInitialize (edict_t *entities, int max) {
|
|||
|
||||
// clear all breakables before initialization
|
||||
m_breakables.clear ();
|
||||
m_checkedBreakables.clear ();
|
||||
|
||||
// initialize all config files
|
||||
conf.loadConfigs ();
|
||||
|
|
@ -154,7 +155,10 @@ void Game::levelInitialize (edict_t *entities, int max) {
|
|||
else if (classname.startsWith ("func_button")) {
|
||||
m_mapFlags |= MapFlags::HasButtons;
|
||||
}
|
||||
else if (util.isShootableBreakable (ent)) {
|
||||
else if (util.isBreakableEntity (ent, true)) {
|
||||
|
||||
// add breakable for material check
|
||||
m_checkedBreakables[indexOfEntity (ent)] = ent->v.impulse <= 0;
|
||||
m_breakables.push (ent);
|
||||
}
|
||||
}
|
||||
|
|
@ -1229,6 +1233,10 @@ edict_t *Game::createFakeClient (StringRef name) {
|
|||
return ent;
|
||||
}
|
||||
|
||||
void Game::markBreakableAsInvalid (edict_t *ent) {
|
||||
m_checkedBreakables[indexOfEntity (ent)] = false;
|
||||
}
|
||||
|
||||
void LightMeasure::initializeLightstyles () {
|
||||
// this function initializes lighting information...
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue