mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Don't treat spikes as solid for non-humanoid entities
There's always been a bit of an inconsistency in the game where enabling invincibility would make spikes so solid that enemies and moving platforms would treat spikes as solid and bounces off of them. This fixes that by adding an `invincible` parameter to collision functions, so the functions will only treat spikes as solid if that parameter is true, and the parameter passed will only be true if it's called for an entity that is a humanoid and invincibility mode is enabled. Also, for clarity, `spikecollide` is renamed to `towerspikecollide` because it's only used for tower spikes. And as a small optimization, `checktowerspikes` returns early if invincibility mode is enabled.
This commit is contained in:
@@ -129,8 +129,8 @@ public:
|
||||
|
||||
bool checktowerspikes(int t);
|
||||
|
||||
bool checkwall(const SDL_Rect& temprect, const float dx, const float dy, const float dr, const bool skipblocks, const bool skipdirblocks);
|
||||
bool checkwall(const SDL_Rect& temprect);
|
||||
bool checkwall(const bool invincible, const SDL_Rect& temprect, const float dx, const float dy, const float dr, const bool skipblocks, const bool skipdirblocks);
|
||||
bool checkwall(const bool invincible, const SDL_Rect& temprect);
|
||||
|
||||
float hplatformat(const int px, const int py);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user