1
This commit is contained in:
parent
deff3d58f4
commit
8e27c5b1de
@ -4,10 +4,16 @@
|
|||||||
#include "debugcmd.h"
|
#include "debugcmd.h"
|
||||||
#include "cs_proto.pb.h"
|
#include "cs_proto.pb.h"
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
|
static bool EnableDebug()
|
||||||
|
{
|
||||||
|
return App::Instance()->instance_id == 6;
|
||||||
|
}
|
||||||
|
|
||||||
void DebugCmd::CreateSphere(Creature* c, float x, float y, float z)
|
void DebugCmd::CreateSphere(Creature* c, float x, float y, float z)
|
||||||
{
|
{
|
||||||
if (c->IsPlayer()) {
|
if (c->IsPlayer() && EnableDebug()) {
|
||||||
cs::SMDebugCmd msg;
|
cs::SMDebugCmd msg;
|
||||||
msg.set_cmd("create_sphere");
|
msg.set_cmd("create_sphere");
|
||||||
msg.add_params(x);
|
msg.add_params(x);
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "car.h"
|
#include "car.h"
|
||||||
#include "trigger.h"
|
#include "trigger.h"
|
||||||
#include "buff.h"
|
#include "buff.h"
|
||||||
|
#include "debugcmd.h"
|
||||||
|
|
||||||
#include "mt/Param.h"
|
#include "mt/Param.h"
|
||||||
#include "mt/Hero.h"
|
#include "mt/Hero.h"
|
||||||
@ -236,6 +237,14 @@ static void InternalCreateBullet(BulletInfo& bullet_info)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
DebugCmd::CreateSphere(c,
|
||||||
|
bullet_info.bullet_born_pos.x,
|
||||||
|
bullet_info.bullet_born_pos.y,
|
||||||
|
bullet_info.bullet_born_pos.z);
|
||||||
|
#endif
|
||||||
|
|
||||||
c->room->frame_event.AddBullet
|
c->room->frame_event.AddBullet
|
||||||
(bullet_uniid,
|
(bullet_uniid,
|
||||||
c->GetWeakPtrRef(),
|
c->GetWeakPtrRef(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user