mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Damage groups WIP
This commit is contained in:
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user