Editor+ (#745)
* feat(Toxic): add send to island * feat(mobile): add helicopter backup * refractor(mobile): update seperator * feat(Troll): add set bounty * tps tp all to island tp all to eclipse tp to eclipse * working hijack &, delete. + placeholders * speed, derail * drive train, working derail * improved drive train * exit train, rework delete * using CReplayInterface
This commit is contained in:
32
src/backend/looped/world/train.cpp
Normal file
32
src/backend/looped/world/train.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
#include "backend/looped/looped.hpp"
|
||||
#include "gta/enums.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "util/blip.hpp"
|
||||
#include "util/entity.hpp"
|
||||
#include "util/train.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void looped::drive_train()
|
||||
{
|
||||
int trainSpeed = ENTITY::GET_ENTITY_SPEED(train::get_closest_train());
|
||||
|
||||
if (g.train.drive_train)
|
||||
{
|
||||
if (PAD::IS_CONTROL_PRESSED(0, 71))
|
||||
trainSpeed++;
|
||||
if (PAD::IS_CONTROL_PRESSED(0, 72))
|
||||
trainSpeed--;
|
||||
|
||||
train::set_train_speed(trainSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
void looped::derail_train()
|
||||
{
|
||||
int train = train::get_closest_train();
|
||||
|
||||
if (train != 0)
|
||||
VEHICLE::SET_RENDER_TRAIN_AS_DERAILED(train, g.train.derail_train);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user