Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
vitaquake3
Commits
3abf8e3e
Commit
3abf8e3e
authored
May 14, 2018
by
Rinnegatamante
Browse files
Updated to latest ioquake3 commit.
parent
e46316dd
Changes
14
Hide whitespace changes
Inline
Side-by-side
code/botlib/be_ai_goal.c
View file @
3abf8e3e
...
...
@@ -226,6 +226,9 @@ void BotInterbreedGoalFuzzyLogic(int parent1, int parent2, int child)
p1
=
BotGoalStateFromHandle
(
parent1
);
p2
=
BotGoalStateFromHandle
(
parent2
);
c
=
BotGoalStateFromHandle
(
child
);
if
(
!
p1
||
!
p2
||
!
c
)
return
;
InterbreedWeightConfigs
(
p1
->
itemweightconfig
,
p2
->
itemweightconfig
,
c
->
itemweightconfig
);
...
...
@@ -239,7 +242,7 @@ void BotInterbreedGoalFuzzyLogic(int parent1, int parent2, int child)
void
BotSaveGoalFuzzyLogic
(
int
goalstate
,
char
*
filename
)
{
//bot_goalstate_t *gs;
//if (!gs) return;
//gs = BotGoalStateFromHandle(goalstate);
//WriteWeightConfig(filename, gs->itemweightconfig);
...
...
@@ -255,7 +258,7 @@ void BotMutateGoalFuzzyLogic(int goalstate, float range)
bot_goalstate_t
*
gs
;
gs
=
BotGoalStateFromHandle
(
goalstate
);
if
(
!
gs
)
return
;
EvolveWeightConfig
(
gs
->
itemweightconfig
);
}
//end of the function BotMutateGoalFuzzyLogic
//===========================================================================
...
...
@@ -894,6 +897,7 @@ int BotGetLevelItemGoal(int index, char *name, bot_goal_t *goal)
goal
->
number
=
li
->
number
;
goal
->
flags
=
GFL_ITEM
;
if
(
li
->
timeout
)
goal
->
flags
|=
GFL_DROPPED
;
goal
->
iteminfo
=
li
->
iteminfo
;
//botimport.Print(PRT_MESSAGE, "found li %s\n", itemconfig->iteminfo[li->iteminfo].name);
return
li
->
number
;
}
//end if
...
...
@@ -920,6 +924,9 @@ int BotGetMapLocationGoal(char *name, bot_goal_t *goal)
goal
->
entitynum
=
0
;
VectorCopy
(
mins
,
goal
->
mins
);
VectorCopy
(
maxs
,
goal
->
maxs
);
goal
->
number
=
0
;
goal
->
flags
=
0
;
goal
->
iteminfo
=
0
;
return
qtrue
;
}
//end if
}
//end for
...
...
@@ -948,6 +955,9 @@ int BotGetNextCampSpotGoal(int num, bot_goal_t *goal)
goal
->
entitynum
=
0
;
VectorCopy
(
mins
,
goal
->
mins
);
VectorCopy
(
maxs
,
goal
->
maxs
);
goal
->
number
=
0
;
goal
->
flags
=
0
;
goal
->
iteminfo
=
0
;
return
num
+
1
;
}
//end if
}
//end for
...
...
code/cgame2/cg_newdraw.c
View file @
3abf8e3e
...
...
@@ -1802,8 +1802,14 @@ int CG_ClientNumFromName(const char *p) {
}
void
CG_ShowResponseHead
(
void
)
{
Menus_OpenByName
(
"voiceMenu"
);
trap_Cvar_Set
(
"cl_conXOffset"
,
"72"
);
float
x
,
y
,
w
,
h
;
x
=
72
;
y
=
w
=
h
=
0
;
CG_AdjustFrom640
(
&
x
,
&
y
,
&
w
,
&
h
);
Menus_OpenByName
(
"voiceMenu"
);
trap_Cvar_Set
(
"cl_conXOffset"
,
va
(
"%d"
,
(
int
)
x
));
cg
.
voiceTime
=
cg
.
time
;
}
...
...
code/client/snd_main.c
View file @
3abf8e3e
...
...
@@ -498,7 +498,7 @@ void S_Init( void )
Cmd_AddCommand
(
"s_stop"
,
S_StopAllSounds
);
Cmd_AddCommand
(
"s_info"
,
S_SoundInfo
);
cv
=
Cvar_Get
(
"s_useOpenAL"
,
"1"
,
CVAR_ARCHIVE
);
cv
=
Cvar_Get
(
"s_useOpenAL"
,
"1"
,
CVAR_ARCHIVE
|
CVAR_LATCH
);
if
(
cv
->
integer
)
{
//OpenAL
started
=
S_AL_Init
(
&
si
);
...
...
code/game/g_active.c
View file @
3abf8e3e
...
...
@@ -320,11 +320,15 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) {
client
=
ent
->
client
;
if
(
client
->
sess
.
spectatorState
!=
SPECTATOR_FOLLOW
)
{
if
(
client
->
noclip
)
{
client
->
ps
.
pm_type
=
PM_NOCLIP
;
if
(
client
->
sess
.
spectatorState
!=
SPECTATOR_FOLLOW
||
!
(
client
->
ps
.
pm_flags
&
PMF_FOLLOW
)
)
{
if
(
client
->
sess
.
spectatorState
==
SPECTATOR_FREE
)
{
if
(
client
->
noclip
)
{
client
->
ps
.
pm_type
=
PM_NOCLIP
;
}
else
{
client
->
ps
.
pm_type
=
PM_SPECTATOR
;
}
}
else
{
client
->
ps
.
pm_type
=
PM_
SPECTATOR
;
client
->
ps
.
pm_type
=
PM_
FREEZE
;
}
client
->
ps
.
speed
=
400
;
// faster than normal
...
...
@@ -1074,14 +1078,17 @@ void SpectatorClientEndFrame( gentity_t *ent ) {
ent
->
client
->
ps
.
pm_flags
|=
PMF_FOLLOW
;
ent
->
client
->
ps
.
eFlags
=
flags
;
return
;
}
else
{
// drop them to free spectators unless they are dedicated camera followers
if
(
ent
->
client
->
sess
.
spectatorClient
>=
0
)
{
ent
->
client
->
sess
.
spectatorState
=
SPECTATOR_FREE
;
ClientBegin
(
ent
->
client
-
level
.
clients
);
}
}
}
if
(
ent
->
client
->
ps
.
pm_flags
&
PMF_FOLLOW
)
{
// drop them to free spectators unless they are dedicated camera followers
if
(
ent
->
client
->
sess
.
spectatorClient
>=
0
)
{
ent
->
client
->
sess
.
spectatorState
=
SPECTATOR_FREE
;
}
ClientBegin
(
ent
->
client
-
level
.
clients
);
}
}
if
(
ent
->
client
->
sess
.
spectatorState
==
SPECTATOR_SCOREBOARD
)
{
...
...
code/game/g_combat.c
View file @
3abf8e3e
...
...
@@ -1141,7 +1141,7 @@ qboolean CanDamage (gentity_t *targ, vec3_t origin) {
VectorCopy
(
midpoint
,
dest
);
dest
[
0
]
+=
offsetmins
[
0
];
dest
[
1
]
+=
offsetmins
[
2
];
dest
[
1
]
+=
offsetmins
[
1
];
dest
[
2
]
+=
offsetmins
[
2
];
trap_Trace
(
&
tr
,
origin
,
vec3_origin
,
vec3_origin
,
dest
,
ENTITYNUM_NONE
,
MASK_SOLID
);
...
...
code/game2/g_active.c
View file @
3abf8e3e
...
...
@@ -320,11 +320,15 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) {
client
=
ent
->
client
;
if
(
client
->
sess
.
spectatorState
!=
SPECTATOR_FOLLOW
)
{
if
(
client
->
noclip
)
{
client
->
ps
.
pm_type
=
PM_NOCLIP
;
if
(
client
->
sess
.
spectatorState
!=
SPECTATOR_FOLLOW
||
!
(
client
->
ps
.
pm_flags
&
PMF_FOLLOW
)
)
{
if
(
client
->
sess
.
spectatorState
==
SPECTATOR_FREE
)
{
if
(
client
->
noclip
)
{
client
->
ps
.
pm_type
=
PM_NOCLIP
;
}
else
{
client
->
ps
.
pm_type
=
PM_SPECTATOR
;
}
}
else
{
client
->
ps
.
pm_type
=
PM_
SPECTATOR
;
client
->
ps
.
pm_type
=
PM_
FREEZE
;
}
client
->
ps
.
speed
=
400
;
// faster than normal
...
...
@@ -1074,14 +1078,17 @@ void SpectatorClientEndFrame( gentity_t *ent ) {
ent
->
client
->
ps
.
pm_flags
|=
PMF_FOLLOW
;
ent
->
client
->
ps
.
eFlags
=
flags
;
return
;
}
else
{
// drop them to free spectators unless they are dedicated camera followers
if
(
ent
->
client
->
sess
.
spectatorClient
>=
0
)
{
ent
->
client
->
sess
.
spectatorState
=
SPECTATOR_FREE
;
ClientBegin
(
ent
->
client
-
level
.
clients
);
}
}
}
if
(
ent
->
client
->
ps
.
pm_flags
&
PMF_FOLLOW
)
{
// drop them to free spectators unless they are dedicated camera followers
if
(
ent
->
client
->
sess
.
spectatorClient
>=
0
)
{
ent
->
client
->
sess
.
spectatorState
=
SPECTATOR_FREE
;
}
ClientBegin
(
ent
->
client
-
level
.
clients
);
}
}
if
(
ent
->
client
->
sess
.
spectatorState
==
SPECTATOR_SCOREBOARD
)
{
...
...
code/game2/g_combat.c
View file @
3abf8e3e
...
...
@@ -1141,7 +1141,7 @@ qboolean CanDamage (gentity_t *targ, vec3_t origin) {
VectorCopy
(
midpoint
,
dest
);
dest
[
0
]
+=
offsetmins
[
0
];
dest
[
1
]
+=
offsetmins
[
2
];
dest
[
1
]
+=
offsetmins
[
1
];
dest
[
2
]
+=
offsetmins
[
2
];
trap_Trace
(
&
tr
,
origin
,
vec3_origin
,
vec3_origin
,
dest
,
ENTITYNUM_NONE
,
MASK_SOLID
);
...
...
code/qcommon/cmd.c
View file @
3abf8e3e
...
...
@@ -689,9 +689,7 @@ void Cmd_RemoveCommand( const char *cmd_name ) {
}
if
(
!
strcmp
(
cmd_name
,
cmd
->
name
)
)
{
*
back
=
cmd
->
next
;
if
(
cmd
->
name
)
{
Z_Free
(
cmd
->
name
);
}
Z_Free
(
cmd
->
name
);
Z_Free
(
cmd
);
return
;
}
...
...
code/qcommon/files.c
View file @
3abf8e3e
...
...
@@ -2495,20 +2495,23 @@ void FS_GetModDescription( const char *modDir, char *description, int descriptio
int
nDescLen
;
FILE
*
file
;
Com_sprintf
(
descPath
,
sizeof
(
descPath
),
"%s
/
description.txt"
,
modDir
);
Com_sprintf
(
descPath
,
sizeof
(
descPath
),
"%s
%c
description.txt"
,
modDir
,
PATH_SEP
);
nDescLen
=
FS_SV_FOpenFileRead
(
descPath
,
&
descHandle
);
if
(
nDescLen
>
0
&&
descHandle
)
{
if
(
nDescLen
>
0
)
{
file
=
FS_FileForHandle
(
descHandle
);
Com_Memset
(
description
,
0
,
descriptionLen
);
nDescLen
=
fread
(
description
,
1
,
descriptionLen
,
file
);
if
(
nDescLen
>=
0
)
{
description
[
nDescLen
]
=
'\0'
;
}
FS_FCloseFile
(
descHandle
);
}
else
{
Q_strncpyz
(
description
,
modDir
,
descriptionLen
);
}
if
(
descHandle
)
{
FS_FCloseFile
(
descHandle
);
}
}
/*
...
...
code/ui/ui_atoms.c
View file @
3abf8e3e
...
...
@@ -512,6 +512,10 @@ void UI_DrawProportionalString( int x, int y, const char* str, int style, vec4_t
int
width
;
float
sizeScale
;
if
(
!
str
)
{
return
;
}
sizeScale
=
UI_ProportionalSizeScale
(
style
);
switch
(
style
&
UI_FORMATMASK
)
{
...
...
code/ui2/ui_gameinfo.c
View file @
3abf8e3e
...
...
@@ -138,12 +138,10 @@ void UI_LoadArenas( void ) {
char
filename
[
128
];
char
dirlist
[
1024
];
char
*
dirptr
;
int
i
,
n
;
int
i
;
int
dirlen
;
char
*
type
;
ui_numArenas
=
0
;
uiInfo
.
mapCount
=
0
;
trap_Cvar_Register
(
&
arenasFile
,
"g_arenasFile"
,
""
,
CVAR_INIT
|
CVAR_ROM
);
if
(
*
arenasFile
.
string
)
{
...
...
@@ -166,7 +164,19 @@ void UI_LoadArenas( void ) {
if
(
UI_OutOfMemory
())
{
trap_Print
(
S_COLOR_YELLOW
"WARNING: not enough memory in pool to load all arenas
\n
"
);
}
}
/*
===============
UI_LoadArenasIntoMapList
===============
*/
void
UI_LoadArenasIntoMapList
(
void
)
{
int
n
;
char
*
type
;
uiInfo
.
mapCount
=
0
;
for
(
n
=
0
;
n
<
ui_numArenas
;
n
++
)
{
// determine type
...
...
code/ui2/ui_local.h
View file @
3abf8e3e
...
...
@@ -359,6 +359,7 @@ int UI_AdjustTimeByGame(int time);
void
UI_ShowPostGame
(
qboolean
newHigh
);
void
UI_ClearScores
(
void
);
void
UI_LoadArenas
(
void
);
void
UI_LoadArenasIntoMapList
(
void
);
//
// ui_menu.c
...
...
code/ui2/ui_main.c
View file @
3abf8e3e
...
...
@@ -1751,16 +1751,10 @@ static int UI_OwnerDrawWidth(int ownerDraw, float scale) {
static
void
UI_DrawBotName
(
rectDef_t
*
rect
,
float
scale
,
vec4_t
color
,
int
textStyle
)
{
int
value
=
uiInfo
.
botIndex
;
int
game
=
trap_Cvar_VariableValue
(
"g_gametype"
);
const
char
*
text
=
""
;
const
char
*
text
;
if
(
game
>=
GT_TEAM
)
{
if
(
value
>=
uiInfo
.
characterCount
)
{
value
=
0
;
}
text
=
uiInfo
.
characterList
[
value
].
name
;
}
else
{
if
(
value
>=
UI_GetNumBots
())
{
value
=
0
;
}
text
=
UI_GetBotNameByNumber
(
value
);
}
Text_Paint
(
rect
->
x
,
rect
->
y
,
scale
,
color
,
text
,
0
,
0
,
textStyle
);
...
...
@@ -2548,16 +2542,16 @@ static qboolean UI_BotName_HandleKey(int flags, float *special, int key) {
value
+=
select
;
if
(
game
>=
GT_TEAM
)
{
if
(
value
>=
uiInfo
.
characterCount
+
2
)
{
if
(
value
>=
uiInfo
.
characterCount
)
{
value
=
0
;
}
else
if
(
value
<
0
)
{
value
=
uiInfo
.
characterCount
+
2
-
1
;
value
=
uiInfo
.
characterCount
-
1
;
}
}
else
{
if
(
value
>=
UI_GetNumBots
()
+
2
)
{
if
(
value
>=
UI_GetNumBots
())
{
value
=
0
;
}
else
if
(
value
<
0
)
{
value
=
UI_GetNumBots
()
+
2
-
1
;
value
=
UI_GetNumBots
()
-
1
;
}
}
uiInfo
.
botIndex
=
value
;
...
...
@@ -3263,6 +3257,7 @@ static void UI_RunMenuScript(char **args) {
trap_Cvar_Set
(
"ui_cdkeyvalid"
,
"CD Key does not appear to be valid."
);
}
}
else
if
(
Q_stricmp
(
name
,
"loadArenas"
)
==
0
)
{
UI_LoadArenasIntoMapList
();
UI_MapCountByGameType
(
qfalse
);
Menu_SetFeederSelection
(
NULL
,
FEEDER_ALLMAPS
,
0
,
"createserver"
);
}
else
if
(
Q_stricmp
(
name
,
"saveControls"
)
==
0
)
{
...
...
code/ui2/ui_shared.c
View file @
3abf8e3e
...
...
@@ -3547,8 +3547,15 @@ qboolean Item_Bind_HandleKey(itemDef_t *item, int key, qboolean down) {
case
K_BACKSPACE
:
id
=
BindingIDFromName
(
item
->
cvar
);
if
(
id
!=
-
1
)
{
g_bindings
[
id
].
bind1
=
-
1
;
g_bindings
[
id
].
bind2
=
-
1
;
if
(
g_bindings
[
id
].
bind1
!=
-
1
)
{
g_bindings
[
id
].
bind2
=
-
1
;
DC
->
setBinding
(
g_bindings
[
id
].
bind1
,
""
);
g_bindings
[
id
].
bind1
=
-
1
;
}
if
(
g_bindings
[
id
].
bind2
!=
-
1
)
{
DC
->
setBinding
(
g_bindings
[
id
].
bind2
,
""
);
g_bindings
[
id
].
bind2
=
-
1
;
}
}
Controls_SetConfig
(
qtrue
);
g_waitingForKey
=
qfalse
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment