projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
water fog material prop; ragdoll float only on drowned
[carveJwlIkooP6JGAAIwe30JlM.git]
/
network_common.h
diff --git
a/network_common.h
b/network_common.h
index d40ba25dbb7e345afe77bcf1f2c2d5d140107e90..ca46e4784ad0584ccc390836efd40e06cefac79a 100644
(file)
--- a/
network_common.h
+++ b/
network_common.h
@@
-1,8
+1,6
@@
-#ifndef NETWORK_COMMON_H
-#define NETWORK_COMMON_H
-
-#include "vg/vg_stdint.h"
+#pragma once
#include "vg/vg_platform.h"
#include "vg/vg_platform.h"
+#include "vg/vg_string.h"
#define NETWORK_USERNAME_MAX 32
#define NETWORK_MAX_PLAYERS 20
#define NETWORK_USERNAME_MAX 32
#define NETWORK_MAX_PLAYERS 20
@@
-10,7
+8,7
@@
#define NETWORK_BUFFERFRAMES 6
#define NETWORK_MAX_CHAT 128
#define NETWORK_REGION_MAX 32
#define NETWORK_BUFFERFRAMES 6
#define NETWORK_MAX_CHAT 128
#define NETWORK_REGION_MAX 32
-#define NETWORK_SKATERIFT_VERSION
9
+#define NETWORK_SKATERIFT_VERSION
10
#define NETWORK_REQUEST_MAX 2048
#define NETWORK_LEADERBOARD_ALLTIME 0
#define NETWORK_REQUEST_MAX 2048
#define NETWORK_LEADERBOARD_ALLTIME 0
@@
-31,12
+29,14
@@
static u32 network_msgstring( const char *src,
static u32 network_pair_index( u32 _a, u32 _b ){
const u32 N = NETWORK_MAX_PLAYERS;
static u32 network_pair_index( u32 _a, u32 _b ){
const u32 N = NETWORK_MAX_PLAYERS;
- assert( (_a != _b) && (_a<N) && (_b<N) );
+
+ if( !((_a != _b) && (_a<N) && (_b<N) ) )
+ {
+ vg_fatal_error( "Programming error\n" );
+ }
u32 a = VG_MIN( _a, _b ),
b = VG_MAX( _a, _b );
return ((N-a)*((N-a)-1))/2 - b + a;
}
u32 a = VG_MIN( _a, _b ),
b = VG_MAX( _a, _b );
return ((N-a)*((N-a)-1))/2 - b + a;
}
-
-#endif /* NETWORK_COMMON_H */