Skip to content

Commit

Permalink
RCON - use 64 bit time on 32 bit windows systems
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscon committed Dec 21, 2022
1 parent 4d4ec00 commit 590e00d
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions cl_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "qtv.h"
#include "fs.h"

/*time type to be used for rcon encryption*/
#ifndef _TIME64_T_DEFINED
#define __qtime_t time_t
#else
#define __qtime_t __time64_t
#endif

void SCR_RSShot_f (void);
void CL_ProcessServerInfo(void);
Expand Down Expand Up @@ -82,10 +88,10 @@ void Cmd_ForwardToServer (void) {
void CL_ForwardToServer_f (void) {
// Added by VVD {
char* server_string;
char client_time_str[sizeof(time_t) * 2 + 1] = { 0 };
int i, server_string_len;
extern cvar_t cl_crypt_rcon;
time_t client_time;
char client_time_str[sizeof(__qtime_t) * 2 + 1] = { 0 };
int i, server_string_len;
extern cvar_t cl_crypt_rcon;
__qtime_t client_time;
// Added by VVD }

if (cls.mvdplayback == QTV_PLAYBACK) {
Expand Down Expand Up @@ -546,11 +552,11 @@ void CL_QStat_f (void)
void CL_Rcon_f (void) {

char message[1024];
char client_time_str[sizeof(time_t) * 2 + 1];
int i, i_from;
char client_time_str[sizeof(__qtime_t) * 2 + 1];
int i, i_from;
netadr_t to;
extern cvar_t rcon_password, rcon_address, cl_crypt_rcon;
time_t client_time;
__qtime_t client_time;

message[0] = (char)255;
message[1] = (char)255;
Expand Down

0 comments on commit 590e00d

Please sign in to comment.