mirror of https://github.com/FWGS/hlsdk-xash3d
Merge branch 'master' into biglolly
This commit is contained in:
commit
f3fd999b23
|
@ -89,12 +89,12 @@ endif()
|
||||||
# MAIN BUILD CODE \
|
# MAIN BUILD CODE \
|
||||||
###################\
|
###################\
|
||||||
|
|
||||||
file(STRINGS "mod_options.txt" MOD_OPTIONS_STRINGS REGEX "^([A-Za-z0-9_]+)=([A-Za-z0-9_]+)\ \#\ (.*)$")
|
file(STRINGS "mod_options.txt" MOD_OPTIONS_STRINGS REGEX "^([A-Za-z0-9_-]+)=([A-Za-z0-9_-]+)\ \#\ (.*)$")
|
||||||
foreach(LINE IN LISTS MOD_OPTIONS_STRINGS)
|
foreach(LINE IN LISTS MOD_OPTIONS_STRINGS)
|
||||||
# file() itself doesn't populate CMAKE_MATCH_<n>, so
|
# file() itself doesn't populate CMAKE_MATCH_<n>, so
|
||||||
# reparse the string
|
# reparse the string
|
||||||
|
|
||||||
if(${LINE} MATCHES "^([A-Za-z0-9_]+)=([A-Za-z0-9_]+)\ \#\ (.*)$")
|
if(${LINE} MATCHES "^([A-Za-z0-9_-]+)=([A-Za-z0-9_-]+)\ \#\ (.*)$")
|
||||||
# detect boolean options
|
# detect boolean options
|
||||||
if(${CMAKE_MATCH_2} STREQUAL "ON" OR ${CMAKE_MATCH_2} STREQUAL "OFF")
|
if(${CMAKE_MATCH_2} STREQUAL "ON" OR ${CMAKE_MATCH_2} STREQUAL "OFF")
|
||||||
option(${CMAKE_MATCH_1} "${CMAKE_MATCH_3}" ${CMAKE_MATCH_2})
|
option(${CMAKE_MATCH_1} "${CMAKE_MATCH_3}" ${CMAKE_MATCH_2})
|
||||||
|
|
|
@ -2217,7 +2217,7 @@ int CRestore::ReadField( void *pBaseData, TYPEDESCRIPTION *pFields, int fieldCou
|
||||||
break;
|
break;
|
||||||
case FIELD_EHANDLE:
|
case FIELD_EHANDLE:
|
||||||
// Input and Output sizes are different!
|
// Input and Output sizes are different!
|
||||||
pInputData = (char*)pData + j * gSizes[pTest->fieldType];
|
pInputData = (char*)pData + j * gInputSizes[pTest->fieldType];
|
||||||
entityIndex = *(int *)pInputData;
|
entityIndex = *(int *)pInputData;
|
||||||
pent = EntityFromIndex( entityIndex );
|
pent = EntityFromIndex( entityIndex );
|
||||||
if( pent )
|
if( pent )
|
||||||
|
|
2
wscript
2
wscript
|
@ -210,7 +210,7 @@ def configure(conf):
|
||||||
conf.define('LINUX', True)
|
conf.define('LINUX', True)
|
||||||
|
|
||||||
conf.msg(msg='-> processing mod options', result='...', color='BLUE')
|
conf.msg(msg='-> processing mod options', result='...', color='BLUE')
|
||||||
regex = re.compile('^([A-Za-z0-9_]+)=([A-Za-z0-9_]+)\ \#\ (.*)$')
|
regex = re.compile('^([A-Za-z0-9_-]+)=([A-Za-z0-9_-]+)\ \#\ (.*)$')
|
||||||
with open(str(conf.path.make_node('mod_options.txt'))) as fd:
|
with open(str(conf.path.make_node('mod_options.txt'))) as fd:
|
||||||
lines = fd.readlines()
|
lines = fd.readlines()
|
||||||
for line in lines:
|
for line in lines:
|
||||||
|
|
Loading…
Reference in New Issue