mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #6974 from Robyt3/Client-Goto-Tele-Crash-Fix
Fix crash when using `goto_tele` in map without tele layer
This commit is contained in:
commit
ac558b0d34
|
@ -256,6 +256,9 @@ void CCamera::SetView(ivec2 Pos)
|
|||
|
||||
void CCamera::GotoSwitch(int Number, int Offset)
|
||||
{
|
||||
if(Collision()->SwitchLayer() == nullptr)
|
||||
return;
|
||||
|
||||
int Match = -1;
|
||||
ivec2 MatchPos = ivec2(-1, -1);
|
||||
|
||||
|
@ -297,6 +300,9 @@ void CCamera::GotoSwitch(int Number, int Offset)
|
|||
|
||||
void CCamera::GotoTele(int Number, int Offset)
|
||||
{
|
||||
if(Collision()->TeleLayer() == nullptr)
|
||||
return;
|
||||
|
||||
int Match = -1;
|
||||
ivec2 MatchPos = ivec2(-1, -1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue