Skip to content

Add Server Gun Validation#98

Open
ekulxam wants to merge 6 commits intodoctor4t:mainfrom
ekulxam:gun-validation
Open

Add Server Gun Validation#98
ekulxam wants to merge 6 commits intodoctor4t:mainfrom
ekulxam:gun-validation

Conversation

@ekulxam
Copy link
Contributor

@ekulxam ekulxam commented Nov 28, 2025

Closes #90

  • Adds an additional raycast in the server receiver to prevent bad clients from shooting arbitrary targets. This raycast is 1 block longer than on client to help account for possible desync
  • Removes all client references in the gun items
    • Now uses a UseItemCallback and ItemTooltipCallback for the gun items (I checked that the networking still works and the tooltip order remains)

Likely will break #68 so preferably that should be merged before this one.

@A-Random-Kitty
Copy link

An issue I see is it doesn't account for side to side desync just desync with the range which would make aiming difficult for players with high ping.

@ekulxam
Copy link
Contributor Author

ekulxam commented Nov 30, 2025

In that case, perhaps I can simply raycast to the target and check if there are blocks in the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There is no Gun Validation on Server

2 participants