Skip to content
Snippets Groups Projects
Commit 28f2fdb6 authored by Perttu Ahola's avatar Perttu Ahola
Browse files

Fix possible NULL dereference in MobV2CAO::step

parent 4e105554
No related branches found
No related tags found
No related merge requests found
......@@ -1000,6 +1000,8 @@ void MobV2CAO::step(float dtime, ClientEnvironment *env)
if(m_sprite_type == "humanoid_1"){
scene::ICameraSceneNode* camera = m_node->getSceneManager()->getActiveCamera();
if(!camera)
return;
v3f cam_to_mob = m_node->getAbsolutePosition() - camera->getAbsolutePosition();
cam_to_mob.normalize();
int col = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment