mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-07-15 23:07:59 +08:00
feat(Self): Part Water (Moses Mode) (#838)
Co-authored-by: TheGreenBandit <106003542+TheGreenBandit@users.noreply.github.com>
This commit is contained in:
32
src/backend/looped/self/part_water.cpp
Normal file
32
src/backend/looped/self/part_water.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
#include "backend/looped/looped.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "backend/looped_command.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
class partwater : looped_command
|
||||
{
|
||||
using looped_command::looped_command;
|
||||
|
||||
virtual void on_tick() override
|
||||
{
|
||||
Vector3 coords = self::pos;
|
||||
float offset[] = { -4, 4 };
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if (i < 2)
|
||||
{
|
||||
coords.x += offset[(i % 2 == 0)];
|
||||
}
|
||||
else if (i < 4)
|
||||
{
|
||||
coords.y += offset[(i % 2 == 0)];
|
||||
}
|
||||
WATER::MODIFY_WATER(coords.x, coords.y, -500000.0f, 0.2f);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
partwater g_partwater("partwater", "Part Water", "Makes you like Moses", g.world.water.part_water);
|
||||
}
|
@ -11,7 +11,7 @@ namespace big
|
||||
{
|
||||
int trainSpeed = ENTITY::GET_ENTITY_SPEED(train::get_closest_train());
|
||||
|
||||
if (g.train.drive_train)
|
||||
if (g.world.train.drive_train)
|
||||
{
|
||||
if (PAD::IS_CONTROL_PRESSED(0, 71))
|
||||
trainSpeed++;
|
||||
@ -27,6 +27,6 @@ namespace big
|
||||
int train = train::get_closest_train();
|
||||
|
||||
if (train != 0)
|
||||
VEHICLE::SET_RENDER_TRAIN_AS_DERAILED(train, g.train.derail_train);
|
||||
VEHICLE::SET_RENDER_TRAIN_AS_DERAILED(train, g.world.train.derail_train);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user