?? damage.cpp
字號(hào):
#include "assert.h"
#include "ray.h"
#include "globals.h"
#include "message.h"
#include "damage.h"
#include "visuals.h"
#include "sprinter.h"
void Give_Damage(pobject the_obj, short amount) {
if (the_obj->stats.current_health>0) {
the_obj->stats.current_health-=amount;
if (the_obj==the_player) {
Visuals_Message(HURT_MESSAGE, (pdata)amount);
}
if (the_obj->stats.current_health<=0) {
if (the_obj==the_player) {
Create_Object(the_player->x, the_player->y,
the_player->z, the_player->angle, EXPLOSION_TYPE,
the_player->owner, the_player->team);
Visuals_Message(VIS_DIE_MSG, NULL);
} else Send_Specific_Message(NULL, the_obj, DIE_MESSAGE, NULL);
}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -