Skip to content

Commit

Permalink
Do not notify the player of discovered dying objects
Browse files Browse the repository at this point in the history
  • Loading branch information
hexagonrecursion committed Aug 27, 2024
1 parent 36ab303 commit a8cc152
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion colobot-base/src/level/robotmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2421,7 +2421,8 @@ bool CRobotMain::EventFrame(const Event &event)
{
glm::vec3 eye = m_engine->GetLookatPt();
float dist = glm::distance(eye, obj->GetPosition());
if ( dist < obj->GetProxyDistance() )
bool isDying = obj->Implements(ObjectInterfaceType::Destroyable) && dynamic_cast<CDestroyableObject&>(*obj).IsDying();
if ( dist < obj->GetProxyDistance() && !isDying )
{
obj->SetProxyActivate(false);
CreateShortcuts();
Expand Down

0 comments on commit a8cc152

Please sign in to comment.