add gun id

This commit is contained in:
aozhiwei 2019-03-28 17:19:38 +08:00
parent 42312ea1dd
commit 008df13cd5
4 changed files with 15 additions and 0 deletions

View File

@ -83,6 +83,7 @@ void Human::Shot(Vector2D& target_dir)
pos.ToPB(bullet->mutable_pos());
target_dir.ToPB(bullet->mutable_dir());
bullet->set_bulletskin(10001);
bullet->set_gun_id(weapon_meta->i->id());
}
{
Bullet* bullet = new Bullet();

View File

@ -100,6 +100,17 @@ namespace MetaData
if (door.door_id == 0 ||
!door.state0 || !door.state1) {
abort();
} else {
int open_dir = 0;
#if 0
if (door.state1->x() < door.state0.x()) {
if (door.state1.y() < door.state0.y()) {
} else {
}
}
#endif
}
}
}

View File

@ -45,6 +45,8 @@ namespace MetaData
struct Door
{
int door_id = 0;
Vector2D state0_dir;
Vector2D state1_dir;
const metatable::DoorObjJson* state0 = nullptr;
const metatable::DoorObjJson* state1 = nullptr;
};

View File

@ -394,6 +394,7 @@ message MFBullet
optional bool crit = 7;
optional int32 reflect_count = 8;
optional int32 reflect_objid = 9;
optional int32 gun_id = 10; //id
}
message MFShot