mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #4766
4766: Fix specteam 1 not showing teammates while spectating/freecam in solo r=def- a=sjrc6 I believe this is the correct solution to https://github.com/ddnet/ddnet/issues/4646. I think the only reason specteam was working is because the CanCollide check would return false for tees outside your team most of the time (since they don't collide). But when you are in solo then you can't collide with anyone, so you won't even be able to see your own team in freecam. ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Tater <Mr.Potatooh@gmail.com>
This commit is contained in:
commit
60fbe85836
|
@ -1163,7 +1163,7 @@ bool CCharacter::CanSnapCharacter(int SnappingClient)
|
|||
{
|
||||
if(pSnapPlayer->m_SpectatorID != -1 && !CanCollide(pSnapPlayer->m_SpectatorID) && (pSnapPlayer->m_ShowOthers == 0 || (pSnapPlayer->m_ShowOthers == 2 && !SameTeam(pSnapPlayer->m_SpectatorID))))
|
||||
return false;
|
||||
else if(pSnapPlayer->m_SpectatorID == -1 && !CanCollide(SnappingClient) && pSnapPlayer->m_SpecTeam)
|
||||
else if(pSnapPlayer->m_SpectatorID == -1 && !CanCollide(SnappingClient) && pSnapPlayer->m_SpecTeam && !SameTeam(SnappingClient))
|
||||
return false;
|
||||
}
|
||||
else if(pSnapChar && !pSnapChar->m_Super && !CanCollide(SnappingClient) && (pSnapPlayer->m_ShowOthers == 0 || (pSnapPlayer->m_ShowOthers == 2 && !SameTeam(SnappingClient))))
|
||||
|
|
Loading…
Reference in a new issue