1
This commit is contained in:
parent
8d59de6e31
commit
8e7b10c959
@ -21,6 +21,7 @@
|
||||
#include "buff.h"
|
||||
#include "collision.h"
|
||||
#include "mapinstance.h"
|
||||
#include "debugcmd.h"
|
||||
|
||||
#include "mt/Param.h"
|
||||
#include "mt/Equip.h"
|
||||
@ -60,6 +61,22 @@ void Bullet::Initialize()
|
||||
}
|
||||
Raycast();
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (DebugCmd::Enable() && sender.Get() && sender.Get()) {
|
||||
glm::vec3 hit_pos;
|
||||
bool hited = room->map_instance->SceneRaycast
|
||||
(GetPos().ToGlmVec3(),
|
||||
dir,
|
||||
gun_meta->range(),
|
||||
hit_pos);
|
||||
if (hited) {
|
||||
DebugCmd::CreateSphere(sender.Get(),
|
||||
hit_pos,
|
||||
glm::vec3(10, 10, 10),
|
||||
room->AllocUniid());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Bullet::Update(int delta_time)
|
||||
|
Loading…
x
Reference in New Issue
Block a user