mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 11:22:45 +01:00
Hardwire sub-mission button in is_button_pressed
to player->isRunning()
This commit is contained in:
parent
a58486fc4f
commit
cf33ef8ca6
@ -85,9 +85,18 @@ void game_set_time(const ScriptArguments& args)
|
||||
|
||||
bool game_is_button_pressed(const ScriptArguments& args)
|
||||
{
|
||||
/// @todo implement
|
||||
RW_UNUSED(args);
|
||||
int player = args[0].integerValue();
|
||||
int index = args[1].integerValue();
|
||||
RW_UNIMPLEMENTED("game_is_button_pressed()");
|
||||
// NOTE: This is a hack. Hence we'll keep the unimplemented message for now.
|
||||
if (player == 0) {
|
||||
if (index == 19) { // look behind / sub-mission
|
||||
/// @todo Return the keystate instead
|
||||
auto object = args.getWorld()->pedestrianPool.find(args.getState()->playerObject);
|
||||
auto player = static_cast<CharacterObject*>(object);
|
||||
return player->isRunning();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user