mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-02-20 19:02:08 +00:00
Replacements system tweaks.
Fixed some other bugs.
This commit is contained in:
parent
46db3bfb39
commit
2fda288831
3 changed files with 79 additions and 15 deletions
|
@ -6,13 +6,22 @@
|
|||
--------------------Configuration: ui - Win32 Release TA--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP52B.tmp" with contents
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP17F.tmp" with contents
|
||||
[
|
||||
/nologo /G6 /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UI_EXPORTS" /FR"Release_TA/" /Fp"Release_TA/ta_ui.pch" /YX /Fo"Release_TA/" /Fd"Release_TA/" /FD /c
|
||||
"C:\Games\Quake3\rq3source\reaction\game\bg_misc.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\game\q_math.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\game\q_shared.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_atoms.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_gameinfo.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_main.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_players.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_shared.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_syscalls.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_util.c"
|
||||
]
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP52B.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP52C.tmp" with contents
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP17F.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP180.tmp" with contents
|
||||
[
|
||||
/nologo /base:"0x40000000" /dll /incremental:no /pdb:"Release_TA/uix86.pdb" /map:"Release_TA/uix86.map" /machine:I386 /def:".\ui.def" /out:"../Release/uix86.dll" /implib:"Release_TA/uix86.lib"
|
||||
.\Release_TA\bg_misc.obj
|
||||
|
@ -26,13 +35,22 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP52C.tmp" with conte
|
|||
.\Release_TA\ui_syscalls.obj
|
||||
.\Release_TA\ui_util.obj
|
||||
]
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP52C.tmp"
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP180.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
bg_misc.c
|
||||
q_math.c
|
||||
q_shared.c
|
||||
ui_atoms.c
|
||||
ui_gameinfo.c
|
||||
ui_main.c
|
||||
ui_players.c
|
||||
ui_shared.c
|
||||
ui_syscalls.c
|
||||
ui_util.c
|
||||
Linking...
|
||||
Creating library Release_TA/uix86.lib and object Release_TA/uix86.exp
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP530.tmp" with contents
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP184.tmp" with contents
|
||||
[
|
||||
/nologo /o"Release_TA/ta_ui.bsc"
|
||||
.\Release_TA\bg_misc.sbr
|
||||
|
@ -45,7 +63,7 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP530.tmp" with conte
|
|||
.\Release_TA\ui_shared.sbr
|
||||
.\Release_TA\ui_syscalls.sbr
|
||||
.\Release_TA\ui_util.sbr]
|
||||
Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP530.tmp"
|
||||
Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP184.tmp"
|
||||
Creating browse info file...
|
||||
<h3>Output Window</h3>
|
||||
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.69 2003/03/31 15:17:58 makro
|
||||
// Replacements system tweaks.
|
||||
// Fixed some other bugs.
|
||||
//
|
||||
// Revision 1.68 2003/03/31 05:54:20 jbravo
|
||||
// More replacementhacks
|
||||
//
|
||||
|
@ -2598,12 +2602,31 @@ void UI_AddReplacement(char *filename)
|
|||
|
||||
//line 2 - cvar value
|
||||
Q_strncpyz(uiInfo.replacements.Cvars[uiInfo.replacements.Count], GetLine(&text), sizeof(uiInfo.replacements.Cvars[uiInfo.replacements.Count]));
|
||||
if (!Q_stricmp(UI_Cvar_VariableString(va("cg_RQ3_%s", uiInfo.replacements.Type)), text))
|
||||
if (!strcmp(UI_Cvar_VariableString(va("cg_RQ3_%s", uiInfo.replacements.Type)), uiInfo.replacements.Cvars[uiInfo.replacements.Count]))
|
||||
{
|
||||
uiInfo.replacements.Index = uiInfo.replacements.Count;
|
||||
}
|
||||
uiInfo.replacements.Count++;
|
||||
}
|
||||
}
|
||||
|
||||
void UI_SelectReplacement(void)
|
||||
{
|
||||
char *currentCvar = UI_Cvar_VariableString(va("cg_RQ3_%s", uiInfo.replacements.Type));
|
||||
|
||||
if (uiInfo.replacements.Count <= 0)
|
||||
return;
|
||||
|
||||
uiInfo.replacements.Index %= uiInfo.replacements.Count;
|
||||
|
||||
//if the model isn't already selected
|
||||
if (strcmp(currentCvar, uiInfo.replacements.Cvars[uiInfo.replacements.Index]))
|
||||
{
|
||||
trap_Cvar_Set(va("cg_RQ3_%s", uiInfo.replacements.Type), uiInfo.replacements.Cvars[uiInfo.replacements.Index]);
|
||||
Q_strcat(uiInfo.replacements.Name, sizeof(uiInfo.replacements.Name), " (*)");
|
||||
}
|
||||
}
|
||||
|
||||
void UI_BuildReplacementList(const char *type)
|
||||
{
|
||||
int i, numfiles, filelen;
|
||||
|
@ -2632,6 +2655,7 @@ void UI_LoadReplacement(int index)
|
|||
int len;
|
||||
fileHandle_t f;
|
||||
char buf[4096], *p, *text, skin[MAX_QPATH], model[MAX_QPATH];
|
||||
char *currentCvar = UI_Cvar_VariableString(va("cg_RQ3_%s", uiInfo.replacements.Type));
|
||||
const char *typeDir = replacementTypes[uiInfo.replacements.TypeIndex % replacementTypeCount].cvarName;
|
||||
|
||||
uiInfo.replacements.Info[0]=0;
|
||||
|
@ -2660,8 +2684,13 @@ void UI_LoadReplacement(int index)
|
|||
Q_strncpyz(model, modelFromStr(p), sizeof(model));
|
||||
if (!Q_stricmp(model, "default"))
|
||||
Q_strncpyz(model, uiInfo.replacements.Type, sizeof(model));
|
||||
if (!strcmp(currentCvar, p))
|
||||
{
|
||||
Q_strcat(uiInfo.replacements.Name, sizeof(uiInfo.replacements.Name), " (*)");
|
||||
}
|
||||
|
||||
Q_strncpyz(skin, skinFromStr(p), sizeof(skin));
|
||||
trap_Cvar_Set(va("cg_RQ3_%s", uiInfo.replacements.Type), p);
|
||||
//trap_Cvar_Set(va("cg_RQ3_%s", uiInfo.replacements.Type), p);
|
||||
|
||||
//line 3 - co-ordinates
|
||||
p = GetLine(&text);
|
||||
|
@ -2673,18 +2702,18 @@ void UI_LoadReplacement(int index)
|
|||
if (!Q_stricmp(typeDir, "ammo")) {
|
||||
uiInfo.replacements.Model = trap_R_RegisterModel(va("models/%s/%s.md3", typeDir, model));
|
||||
uiInfo.replacements.Skin = trap_R_RegisterSkin(va("models/%s/%s.skin", typeDir, skin));
|
||||
Com_Printf("AmmoModel: %s\n", va("models/%s/%s.md3", typeDir, model));
|
||||
Com_Printf("AmmoSkin : %s\n", va("models/%s/%s.skin", typeDir, skin));
|
||||
//Com_Printf("AmmoModel: %s\n", va("models/%s/%s.md3", typeDir, model));
|
||||
//Com_Printf("AmmoSkin : %s\n", va("models/%s/%s.skin", typeDir, skin));
|
||||
} else if (!Q_stricmp(typeDir, "items")) {
|
||||
uiInfo.replacements.Model = trap_R_RegisterModel(va("models/%s/%s.md3", typeDir, model));
|
||||
uiInfo.replacements.Skin = trap_R_RegisterSkin(va("models/%s/%s/%s.skin", typeDir, model, skin));
|
||||
Com_Printf("ItemModel: %s\n", va("models/%s/%s.md3", typeDir, model));
|
||||
Com_Printf("ItemSkin : %s\n", va("models/%s/%s/%s.skin", typeDir, model, skin));
|
||||
//Com_Printf("ItemModel: %s\n", va("models/%s/%s.md3", typeDir, model));
|
||||
//Com_Printf("ItemSkin : %s\n", va("models/%s/%s/%s.skin", typeDir, model, skin));
|
||||
} else {
|
||||
uiInfo.replacements.Model = trap_R_RegisterModel(va("models/%s/%s/%s.md3", typeDir, model, uiInfo.replacements.Type));
|
||||
uiInfo.replacements.Skin = trap_R_RegisterSkin(va("models/%s/%s/%s.skin", typeDir, model, skin));
|
||||
Com_Printf("WeaponModel: %s\n", va("models/%s/%s/%s.md3", typeDir, model, uiInfo.replacements.Type));
|
||||
Com_Printf("WeaponSkin : %s\n", va("models/%s/%s/%s.skin", typeDir, model, skin));
|
||||
//Com_Printf("WeaponModel: %s\n", va("models/%s/%s/%s.md3", typeDir, model, uiInfo.replacements.Type));
|
||||
//Com_Printf("WeaponSkin : %s\n", va("models/%s/%s/%s.skin", typeDir, model, skin));
|
||||
}
|
||||
//...replacement info
|
||||
Q_strncpyz(uiInfo.replacements.Info, text, sizeof(uiInfo.replacements.Info));
|
||||
|
@ -3055,7 +3084,11 @@ static void UI_DrawReplacementModel(rectDef_t *rect)
|
|||
//adjust = 360 % (int)((float)uis.realtime / 1000);
|
||||
//VectorSet( angles, 0, 0, 1 );
|
||||
|
||||
VectorCopy(uiInfo.replacements.angles, angles);
|
||||
//changed for Birdman...
|
||||
//VectorCopy(uiInfo.replacements.angles, angles);
|
||||
angles[YAW] = uiInfo.replacements.angles[0];
|
||||
angles[PITCH] = uiInfo.replacements.angles[1];
|
||||
angles[ROLL] = uiInfo.replacements.angles[2];
|
||||
// rotation
|
||||
if (uiInfo.replacements.speed) {
|
||||
angles[YAW] += uiInfo.replacements.speed * uiInfo.uiDC.realTime / 1000.0f;
|
||||
|
@ -5359,6 +5392,9 @@ static void UI_RunMenuScript(char **args)
|
|||
index = uiInfo.replacements.Count-1;
|
||||
UI_LoadReplacement(index);
|
||||
}
|
||||
//Makro - select replacement
|
||||
} else if (Q_stricmp(name, "selectReplacement") == 0) {
|
||||
UI_SelectReplacement();
|
||||
} else if (Q_stricmp(name, "update") == 0) {
|
||||
if (String_Parse(args, &name2)) {
|
||||
UI_Update(name2);
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.28 2003/03/31 15:17:58 makro
|
||||
// Replacements system tweaks.
|
||||
// Fixed some other bugs.
|
||||
//
|
||||
// Revision 1.27 2003/03/31 00:40:54 makro
|
||||
// Fixed a bug
|
||||
//
|
||||
|
@ -1114,6 +1118,9 @@ void Script_SetColor(itemDef_t * item, char **args)
|
|||
}
|
||||
(*out)[i] = f;
|
||||
}
|
||||
//Makro - if the item was fading, stop the fading process
|
||||
if (item->window.timeFade.active)
|
||||
item->window.timeFade.active = qfalse;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1205,6 +1212,9 @@ void Script_SetItemColor(itemDef_t * item, char **args)
|
|||
for (i = 0; i < 4; i++) {
|
||||
(*out)[i] = color[i];
|
||||
}
|
||||
//Makro - if the item was fading, stop the fading process
|
||||
if (item2->window.timeFade.active)
|
||||
item2->window.timeFade.active = qfalse;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue