Fix AT-ST usable hint icon

This commit is contained in:
Petr Bartos 2023-04-16 15:18:57 +02:00
parent 0c85ac4704
commit 5acadef11e
2 changed files with 8 additions and 3 deletions

View file

@ -1699,6 +1699,11 @@ qboolean CanUseInfrontOf(gentity_t *ent)
target = &g_entities[trace.entityNum];
if ( target && target->e_UseFunc == useF_misc_atst_use )
{
// Drivable AT-ST can be used only if player is standing on it.
return qfalse;
}
if ( target && target->client && target->client->NPC_class == CLASS_VEHICLE )
{
// Attempt to board this vehicle.

View file

@ -1472,10 +1472,10 @@ qboolean CanUseInfrontOf(gentity_t *ent)
target = &g_entities[trace.entityNum];
if ( target && target->client && target->client->NPC_class == CLASS_ATST )
if ( target && target->e_UseFunc == useF_misc_atst_use )
{
// Attempt to board this vehicle.
return qtrue;
// Drivable AT-ST can be used only if player is standing on it.
return qfalse;
}
//Check for a use command
if (ValidUseTarget( target )) {