mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-21 19:51:33 +00:00
Allow demo assets map to be played
only register appropriate weapon models if playing the demo map
This commit is contained in:
parent
82ace54c07
commit
eed4ea9e15
4 changed files with 31 additions and 32 deletions
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.drbeef.jkquest"
|
||||
android:versionCode="38"
|
||||
android:versionName="0.6.1" android:installLocation="auto" >
|
||||
android:versionCode="39"
|
||||
android:versionName="0.6.2" android:installLocation="auto" >
|
||||
|
||||
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
||||
<uses-feature android:glEsVersion="0x00030002" android:required="true"/>
|
||||
|
|
|
@ -3177,20 +3177,7 @@ void CG_DrawItemSelector( void )
|
|||
break;
|
||||
}
|
||||
|
||||
#ifdef _DEMO
|
||||
if (itemId == WP_SABER ||
|
||||
itemId == WP_BRYAR_PISTOL ||
|
||||
itemId == WP_BLASTER ||
|
||||
itemId == WP_FLECHETTE ||
|
||||
itemId == WP_REPEATER ||
|
||||
itemId == WP_THERMAL) {
|
||||
CG_RegisterWeapon(itemId);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
#else
|
||||
CG_RegisterWeapon(itemId);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1520,10 +1520,34 @@ Ghoul2 Insert End
|
|||
CG_NewClientinfo( i );
|
||||
}
|
||||
|
||||
const char *info = CG_ConfigString( CS_SERVERINFO );
|
||||
const char *mapname = Info_ValueForKey( info, "mapname" );
|
||||
bool isDemoMap = !strcmp(mapname,"demo");
|
||||
|
||||
//Just register all weapons to avoid a pause when opening the selector
|
||||
for (i=0; i < WP_MELEE; i++)
|
||||
for (i=0; i <= WP_MELEE; i++)
|
||||
{
|
||||
CG_RegisterWeapon(i);
|
||||
//Only certain weapon models available in the demo pk3
|
||||
if (isDemoMap)
|
||||
{
|
||||
if (i == WP_SABER ||
|
||||
i == WP_BRYAR_PISTOL ||
|
||||
i == WP_BLASTER ||
|
||||
i == WP_FLECHETTE ||
|
||||
i == WP_REPEATER ||
|
||||
i == WP_THERMAL)
|
||||
{
|
||||
CG_RegisterWeapon(i);
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CG_RegisterWeapon(i);
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0 ; i < ENTITYNUM_WORLD ; i++)
|
||||
|
|
|
@ -3013,6 +3013,9 @@ void CG_DrawItemSelector( void )
|
|||
}
|
||||
}
|
||||
|
||||
const char *info = CG_ConfigString( CS_SERVERINFO );
|
||||
const char *mapname = Info_ValueForKey( info, "mapname" );
|
||||
|
||||
qboolean selected = qfalse;
|
||||
for (int index = 0; index < count; ++index)
|
||||
{
|
||||
|
@ -3029,21 +3032,6 @@ void CG_DrawItemSelector( void )
|
|||
{
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef _DEMO
|
||||
if (itemId == WP_SABER ||
|
||||
itemId == WP_BRYAR_PISTOL ||
|
||||
itemId == WP_BLASTER ||
|
||||
itemId == WP_FLECHETTE ||
|
||||
itemId == WP_REPEATER ||
|
||||
itemId == WP_THERMAL) {
|
||||
CG_RegisterWeapon(itemId);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
#else
|
||||
CG_RegisterWeapon(itemId);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue