[Quake2world-dev] r503 - quake2world/trunk/src

jdolan at jdolan.dyndns.org jdolan at jdolan.dyndns.org
Sun May 24 14:27:55 UTC 2009


Author: jdolan
Date: 2009-05-24 14:27:54 +0000 (Sun, 24 May 2009)
New Revision: 503

Modified:
   quake2world/trunk/src/shared.c
Log:
Fix swaptest?

Modified: quake2world/trunk/src/shared.c
===================================================================
--- quake2world/trunk/src/shared.c	2009-05-24 13:59:45 UTC (rev 502)
+++ quake2world/trunk/src/shared.c	2009-05-24 14:27:54 UTC (rev 503)
@@ -25,7 +25,7 @@
 vec3_t vec3_origin = {0.0, 0.0, 0.0};
 
 vec3_t PM_MINS = { -16.0, -16.0, -24.0};
-vec3_t PM_MAXS = {  16.0,  16.0,  42.0};
+vec3_t PM_MAXS = {  16.0,  16.0,  40.0};
 
 
 /*
@@ -889,14 +889,21 @@
 }
 
 
+union {
+	byte b[2];
+	unsigned short s;
+} swaptest;
+
 /*
  * Swap_Init
  */
 void Swap_Init(void){
-	byte swaptest[2] = {1, 0};
 
+	swaptest.b[0] = 0;
+	swaptest.b[1] = 1;
+
 	// set the byte swapping variables in a portable manner
-	if(*(short *)swaptest == 1){
+	if(swaptest.s == 1){
 		bigendien = false;
 		_BigShort = ShortSwap;
 		_LittleShort = ShortNoSwap;



More information about the Quake2World-dev mailing list