1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 18:32:44 +01:00

Merge pull request #442 from husho/buildfix

Access `engine` directly instead through `character->engine`
This commit is contained in:
Jannik Vogel 2018-05-06 21:40:18 +02:00 committed by GitHub
commit 648762e1bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@
#include "dynamics/CollisionInstance.hpp"
#include "dynamics/RaycastCallbacks.hpp"
#include "engine/GameData.hpp"
#include "engine/GameState.hpp"
#include "engine/GameWorld.hpp"
#include "objects/CharacterObject.hpp"
@ -863,7 +864,7 @@ void VehicleObject::grantOccupantRewards(CharacterObject* character) {
|| getVehicle()->vehiclename_ == "CABBIE"
|| getVehicle()->vehiclename_ == "BORGNINE") {
// Earn $25 from taxi cabs
character->engine->state->playerInfo.money += 25;
engine->state->playerInfo.money += 25;
} else if (getVehicle()->vehiclename_ == "POLICAR") {
// Police cruisers give 5 shotgun cartridges
character->addToInventory(4, 5);