1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Damage groups WIP

This commit is contained in:
Perttu Ahola 2012-03-05 01:30:55 +02:00
parent e9cdb938fe
commit 501b8fe743
6 changed files with 136 additions and 29 deletions

View file

@ -2088,10 +2088,13 @@ void the_game(
}
if(do_punch_damage){
// Report direct punch
v3f objpos = selected_object->getPosition();
v3f dir = (objpos - player_position).normalize();
bool disable_send = selected_object->directReportPunch(playeritem.name, dir);
v3f objpos = selected_object->getPosition();
v3f dir = (objpos - player_position).normalize();
// TODO: Get time_from_last_punch from somewhere
float time_from_last_punch = 1000000;
bool disable_send = selected_object->directReportPunch(
dir, &playeritem, time_from_last_punch);
if(!disable_send)
client.interact(0, pointed);
}