diff --git a/Makefile b/Makefile index 2226dea3..01709573 100644 --- a/Makefile +++ b/Makefile @@ -269,6 +269,7 @@ release/baseq2/game.so : LDFLAGS += -shared # Used by the game GAME_OBJS_ = \ src/common/shared/flash.o \ + src/common/shared/rand.o \ src/common/shared/shared.o \ src/game/g_ai.o \ src/game/g_chase.o \ @@ -353,7 +354,6 @@ CLIENT_OBJS_ := \ src/common/misc.o \ src/common/netchan.o \ src/common/pmove.o \ - src/common/rand.o \ src/common/szone.o \ src/common/zone.o \ src/common/command/cmd_execution.o \ @@ -369,6 +369,7 @@ CLIENT_OBJS_ := \ src/common/model/cm_bsp.o \ src/common/model/cm_vis.o \ src/common/shared/flash.o \ + src/common/shared/rand.o \ src/common/shared/shared.o \ src/common/unzip/ioapi.o \ src/common/unzip/unzip.o \ @@ -404,7 +405,6 @@ SERVER_OBJS_ := \ src/common/misc.o \ src/common/netchan.o \ src/common/pmove.o \ - src/common/rand.o \ src/common/szone.o \ src/common/zone.o \ src/common/command/cmd_execution.o \ @@ -419,6 +419,7 @@ SERVER_OBJS_ := \ src/common/model/cm_boxtracing.o \ src/common/model/cm_bsp.o \ src/common/model/cm_vis.o \ + src/common/shared/rand.o \ src/common/shared/shared.o \ src/common/unzip/ioapi.o \ src/common/unzip/unzip.o \ diff --git a/src/common/header/common.h b/src/common/header/common.h index 6d4a9e5d..62a39159 100644 --- a/src/common/header/common.h +++ b/src/common/header/common.h @@ -754,10 +754,4 @@ void SV_Init (void); void SV_Shutdown (char *finalmsg, qboolean reconnect); void SV_Frame (int msec); -/* Random number generator */ -int randk(void); -float frandk(void); -float crandk(void); -void randk_seed(void); - #endif diff --git a/src/common/header/shared.h b/src/common/header/shared.h index 9baf393e..996babb7 100644 --- a/src/common/header/shared.h +++ b/src/common/header/shared.h @@ -229,6 +229,14 @@ void Info_RemoveKey(char *s, char *key); void Info_SetValueForKey(char *s, char *key, char *value); qboolean Info_Validate(char *s); +/* ============================================= */ + +/* Random number generator */ +int randk(void); +float frandk(void); +float crandk(void); +void randk_seed(void); + /* * ============================================================== * diff --git a/src/common/rand.c b/src/common/shared/rand.c similarity index 100% rename from src/common/rand.c rename to src/common/shared/rand.c