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:
parent
e9cdb938fe
commit
501b8fe743
6 changed files with 136 additions and 29 deletions
11
src/game.cpp
11
src/game.cpp
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue