Added basic server reconcilliation

This commit is contained in:
2023-08-03 00:15:44 +01:00
parent 663199f3e4
commit e544b01ef1
3 changed files with 86 additions and 4 deletions

View File

@ -4,6 +4,7 @@
#include <stdbool.h>
#include <sys/time.h>
#include <netinet/in.h>
struct clientMovement
{
double xPosition, yPosition, xVelocity, yVelocity;
@ -30,6 +31,12 @@ struct networkThreadArguments
struct gameState * state;
};
struct inputHistory
{
uint8_t start, end;
struct clientInput inputs[256];
};
void updateInput(struct gameState * state, struct clientInput * message);
void doGameTick(struct gameState * state);