mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-01-12 08:08:06 +00:00
game: small fixes
This commit is contained in:
parent
432a6b2297
commit
ac956a9b4f
@ -30,7 +30,7 @@ END_RECV_TABLE()
|
|||||||
void C_VoteController::RecvProxy_VoteType( const CRecvProxyData *pData, void *pStruct, void *pOut )
|
void C_VoteController::RecvProxy_VoteType( const CRecvProxyData *pData, void *pStruct, void *pOut )
|
||||||
{
|
{
|
||||||
C_VoteController *pMe = (C_VoteController *)pStruct;
|
C_VoteController *pMe = (C_VoteController *)pStruct;
|
||||||
if( pMe->m_iActiveIssueIndex == pData->m_Value.m_Int )
|
if( memcmp( &pMe->m_iActiveIssueIndex, &pData->m_Value.m_Int, sizeof(pData->m_Value.m_Int)) == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memcpy( &pMe->m_iActiveIssueIndex, &pData->m_Value.m_Int, sizeof(pData->m_Value.m_Int) );
|
memcpy( &pMe->m_iActiveIssueIndex, &pData->m_Value.m_Int, sizeof(pData->m_Value.m_Int) );
|
||||||
|
@ -2517,6 +2517,8 @@ LINK_ENTITY_TO_CLASS( trigger_autosave, CTriggerSave );
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CTriggerSave::Spawn( void )
|
void CTriggerSave::Spawn( void )
|
||||||
{
|
{
|
||||||
|
m_minHitPoints = 1;
|
||||||
|
|
||||||
if ( g_pGameRules->IsDeathmatch() )
|
if ( g_pGameRules->IsDeathmatch() )
|
||||||
{
|
{
|
||||||
UTIL_Remove( this );
|
UTIL_Remove( this );
|
||||||
@ -2534,7 +2536,7 @@ void CTriggerSave::Spawn( void )
|
|||||||
void CTriggerSave::Touch( CBaseEntity *pOther )
|
void CTriggerSave::Touch( CBaseEntity *pOther )
|
||||||
{
|
{
|
||||||
// Only save on clients
|
// Only save on clients
|
||||||
if ( !pOther->IsPlayer() )
|
if ( !pOther->IsPlayer() || !pOther->IsAlive() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( m_fDangerousTimer != 0.0f )
|
if ( m_fDangerousTimer != 0.0f )
|
||||||
|
@ -2,6 +2,17 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|
||||||
|
#ifdef ANDROID
|
||||||
|
#include <android/log.h>
|
||||||
|
|
||||||
|
#define TAG "SRCENG"
|
||||||
|
#define PRIO ANDROID_LOG_DEBUG
|
||||||
|
#define LogPrintf(...) do { __android_log_print(PRIO, TAG, __VA_ARGS__); printf( __VA_ARGS__); } while( 0 );
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define LogPrintf(...) printf(__VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef void (*t_set_getprocaddress)(void *(*new_proc_address)(const char *));
|
typedef void (*t_set_getprocaddress)(void *(*new_proc_address)(const char *));
|
||||||
t_set_getprocaddress gl4es_set_getprocaddress;
|
t_set_getprocaddress gl4es_set_getprocaddress;
|
||||||
|
|
||||||
@ -18,13 +29,13 @@ void InitGL4ES()
|
|||||||
void *lgl4es = dlopen("libgl4es.so", RTLD_LAZY);
|
void *lgl4es = dlopen("libgl4es.so", RTLD_LAZY);
|
||||||
if( !lgl4es )
|
if( !lgl4es )
|
||||||
{
|
{
|
||||||
printf("Failed to dlopen library libgl4es.so: %s\n", dlerror());
|
LogPrintf("Failed to dlopen library libgl4es.so: %s\n", dlerror());
|
||||||
}
|
}
|
||||||
|
|
||||||
void *lEGL = dlopen("libEGL.so", RTLD_LAZY);
|
void *lEGL = dlopen("libEGL.so", RTLD_LAZY);
|
||||||
if( !lEGL )
|
if( !lEGL )
|
||||||
{
|
{
|
||||||
printf("Failed to dlopen library libEGL.so: %s\n", dlerror());
|
LogPrintf("Failed to dlopen library libEGL.so: %s\n", dlerror());
|
||||||
}
|
}
|
||||||
|
|
||||||
gl4es_set_getprocaddress = (t_set_getprocaddress)dlsym(lgl4es, "set_getprocaddress");
|
gl4es_set_getprocaddress = (t_set_getprocaddress)dlsym(lgl4es, "set_getprocaddress");
|
||||||
@ -36,13 +47,11 @@ void InitGL4ES()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("Failed to call set_getprocaddress\n");
|
LogPrintf("Failed to call set_getprocaddress\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
|
|
||||||
#include <android/log.h>
|
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -217,6 +217,9 @@ static void WaitForDebuggerConnect( int argc, char *argv[], int time )
|
|||||||
int main( int argc, char *argv[] )
|
int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
void *launcher = dlopen( "bin/liblauncher" DLL_EXT_STRING, RTLD_NOW );
|
void *launcher = dlopen( "bin/liblauncher" DLL_EXT_STRING, RTLD_NOW );
|
||||||
|
if ( !launcher )
|
||||||
|
fprintf( stderr, "%s\nFailed to load the launcher\n", dlerror() );
|
||||||
|
|
||||||
if( !launcher )
|
if( !launcher )
|
||||||
launcher = dlopen( "bin/launcher" DLL_EXT_STRING, RTLD_NOW );
|
launcher = dlopen( "bin/launcher" DLL_EXT_STRING, RTLD_NOW );
|
||||||
|
|
||||||
|
@ -3769,6 +3769,10 @@ static int ShadowDepthSamplerMaskFromName( const char *pName )
|
|||||||
{
|
{
|
||||||
return (1<<7);
|
return (1<<7);
|
||||||
}
|
}
|
||||||
|
else if ( V_stristr( pName, "skin_ps" ) )
|
||||||
|
{
|
||||||
|
return (1<<4) | (1<<6);
|
||||||
|
}
|
||||||
else if ( V_stristr( pName, "infected_ps" ) )
|
else if ( V_stristr( pName, "infected_ps" ) )
|
||||||
{
|
{
|
||||||
return (1<<1);
|
return (1<<1);
|
||||||
@ -3795,7 +3799,7 @@ static int ShadowDepthSamplerMaskFromName( const char *pName )
|
|||||||
}
|
}
|
||||||
else if ( V_stristr( pName, "worldtwotextureblend_ps" ) )
|
else if ( V_stristr( pName, "worldtwotextureblend_ps" ) )
|
||||||
{
|
{
|
||||||
return (1<<7);
|
return (1<<2);
|
||||||
}
|
}
|
||||||
else if ( V_stristr( pName, "teeth_flashlight_ps" ) )
|
else if ( V_stristr( pName, "teeth_flashlight_ps" ) )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user