Skip to content

Commit

Permalink
Merge pull request #847 from WALLOFJUSTICE/dev-23-q3-2
Browse files Browse the repository at this point in the history
* fix camera shake for multiplayer clients 0 dmg
  • Loading branch information
WALLOFJUSTICE authored Oct 24, 2024
2 parents 039e4f9 + 8d0bda3 commit 1252488
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10927,8 +10927,16 @@ void Entity::attack(int pose, int charge, Entity* target)
else
{
strcpy((char*)net_packet->data, "SHAK");
net_packet->data[4] = 10; // turns into .1
net_packet->data[5] = 10;
if ( damage > 0 )
{
net_packet->data[4] = 10; // turns into .1
net_packet->data[5] = 10;
}
else
{
net_packet->data[4] = 5; // turns into .05
net_packet->data[5] = 5;
}
net_packet->address.host = net_clients[playerhit - 1].host;
net_packet->address.port = net_clients[playerhit - 1].port;
net_packet->len = 6;
Expand Down

0 comments on commit 1252488

Please sign in to comment.