Skip to content

Commit

Permalink
fix: fix crash when loading saves using ghost_type 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mlugg committed Jun 19, 2021
1 parent f3ff46e commit 146f94b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Features/Demo/GhostEntity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void GhostEntity::Display()
const int tris = 30;

auto player = client->GetPlayer(GET_SLOT() + 1);
Vector pos = client->GetAbsOrigin(player) + client->GetViewOffset(player);
Vector pos = player ? client->GetAbsOrigin(player) + client->GetViewOffset(player) : Vector{ 0, 0, 0 };

float dx = origin.x - pos.x;
float dy = origin.y - pos.y;
Expand Down

0 comments on commit 146f94b

Please sign in to comment.