mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fix wrong condition for checking entity
This commit is contained in:
parent
3cc417151d
commit
37466cdffb
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ void BotController::CheckUse(void)
|
|||
trace = G_Trace(start, vec_zero, vec_zero, end, controlledEnt, MASK_USABLE, false, "BotController::CheckUse");
|
||||
|
||||
// It may be a door
|
||||
if ((trace.allsolid || trace.startsolid || trace.fraction != 1.0f) && trace.entityNum) {
|
||||
if ((trace.allsolid || trace.startsolid || trace.fraction != 1.0f) && trace.ent) {
|
||||
if (trace.ent->entity->IsSubclassOfDoor()) {
|
||||
Door *door = static_cast<Door *>(trace.ent->entity);
|
||||
if (door->isOpen()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue