mirror of
https://github.com/rwengine/openrw.git
synced 2024-09-15 15:02:34 +02:00
implement isPlayer()
This commit is contained in:
parent
7f2c512f50
commit
7b0b82c502
@ -6,11 +6,11 @@ class PlayerController;
|
||||
class Logger;
|
||||
|
||||
class GameData;
|
||||
class GameState;
|
||||
|
||||
#include <ai/AIGraph.hpp>
|
||||
#include <ai/AIGraphNode.hpp>
|
||||
#include <audio/SoundManager.hpp>
|
||||
#include <engine/GameState.hpp>
|
||||
|
||||
class CutsceneObject;
|
||||
#include <objects/ObjectTypes.hpp>
|
||||
|
@ -385,7 +385,7 @@ void CharacterObject::setPosition(const glm::vec3& pos) {
|
||||
}
|
||||
|
||||
bool CharacterObject::isPlayer() const {
|
||||
return true; /// @todo implement detection via playerObject
|
||||
return engine->state->playerObject == getGameObjectID();
|
||||
}
|
||||
|
||||
bool CharacterObject::isAlive() const {
|
||||
|
Loading…
Reference in New Issue
Block a user