Skip to content
Success

Changes

Summary

  1. Packets.c: Pretype to float when writting to float (commit: 4b96de4) (details)
  2. Server: Make grenades into linked list (commit: 61fcd73) (details)
Commit 4b96de497e21a4b2fd0334e6dd81d2990a82e22b by 16738302+Haxk20
Packets.c: Pretype to float when writting to float

While this produced no issues so far it is
better to type it to float and then divide
as without it, it is very much bug-prone
(commit: 4b96de4)
The file was modified Source/Packets.c (diff)
Commit 61fcd7320dd9622592a4d99a0508335f57525bce by 16738302+Haxk20
Server: Make grenades into linked list

This logic allows us to have as many grenades per player
as they wish.

Also do NOT create packets when the number of players
on server is 0. Its pointless. We have nobody to send it
to causing pointless malloc and then freeing of the memory
if it were not sent. This was found during testing to make
sure grenades explode even when player disconnects while grenade
is in the air and nobody is on the server.
Sending the grenade packet would allocate memory for the packet but
it would not be sent to anybody causing a memory leak since
it didnt get freed as it does after sending it.
(commit: 61fcd73)
The file was modified Source/Util/Physics.h (diff)
The file was modified Source/Protocol.c (diff)
The file was modified Source/Packets.c (diff)
The file was modified Source/Structs.h (diff)
The file was modified Source/Protocol.h (diff)