CnCNet / yrpp-spawner

CnCNet DLL for Command and Conquer: Yuri's Revenge using Syringe
GNU General Public License v3.0
21 stars 13 forks source link

Allow cloaked units under player control to have SELECT cursor on it when about to select #20

Open chaserli opened 6 months ago

chaserli commented 6 months ago

Basically at this point it's useless to do all these checks. What had the program done?

if(!this->IsArmed() || !this->Owner->ControlledByCurrentPlayer() || this->Owner==pObject->GetOwningHouse())
    if((this->Spawned || !this->ControlledByCurrentPlayer)
          && pObject->CanBeSelected() &&..)
         return Action::Select;

 return Action::None;

This is the very end of that function it's not sufficient to only let "me" select pObject if it belongs to this->Owner which is known to be controlled by me. It is also possible that "I" (the controller of this) can only control the owning house of pObject but is not it. In that case you gotta let me select it too

github-actions[bot] commented 6 months ago

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

Belonit commented 6 months ago

@chaserli If you don't mind, I'll get back to this PR in a couple of weeks. There are a few other things I'm busy with right now

chaserli commented 6 months ago

@chaserli If you don't mind, I'll get back to this PR in a couple of weeks. There are a few other things I'm busy with right now

sure not, you could even work on #21 before this one