2.机甲子弹射击物资箱,无法打破
This commit is contained in:
parent
e111fd15f9
commit
594aa6b61c
@ -12,6 +12,7 @@
|
||||
#include "typeconvert.h"
|
||||
#include "bullet.h"
|
||||
#include "explosion.h"
|
||||
#include "obstacle.h"
|
||||
|
||||
Car::Car():Creature()
|
||||
{
|
||||
@ -392,3 +393,10 @@ float Car::GetMaxOil()
|
||||
{
|
||||
return meta->i->max_oil();
|
||||
}
|
||||
|
||||
void Car::DropItems(Obstacle* obstacle)
|
||||
{
|
||||
if (obstacle->meta->i->drop() != 0) {
|
||||
room->ScatterDrop(obstacle->GetPos(), obstacle->meta->i->drop());
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ class Car : public Creature
|
||||
virtual void DecHP(float dec_hp, int killer_id, const std::string& killer_name, int weapon_id) override;
|
||||
virtual void SendDebugMsg(const std::string& debug_msg) override;
|
||||
virtual void SetAttackDir(const a8::Vec2& attack_dir) override;
|
||||
virtual void DropItems(Obstacle* obstacle) override;
|
||||
|
||||
private:
|
||||
int AllocSeat();
|
||||
|
Loading…
x
Reference in New Issue
Block a user