mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Mapbase v4.3
- Fixed a crash with multiple trigger_look targets - Fixed an issue where some zombie submodel server ragdolls are not solid to the world - Fixed a crash with certain instance classes being loaded in a savegame before the class is registered - Added some of Tony Sergi's missing Source 2007 fixes (contributed by Kris) - Added "ClientCommand" hook for VScript to allow handling of unknown console commands - Added "PlayerRunCommand" hook for VScript to control player movement - Added new button-related script functions for players (GetButtons, DisableButtons, etc.) - Added CUserCmd accessor in VScript for the "PlayerRunCommand" hook - Added "GetWaterLevel" function for VScript - Exposed "Ignite" to VScript for controlling how a fire starts - Fixed NPCs being unable to unholster weapons - Fixed Mapbase crashing when Steam isn't running - Fixed issues with angled/updating sky_camera save/restore - Added VBSP "-skyboxcubemap" parameter to enable skybox default cubemaps + "-defaultcubemapres" to control their resolution - Added ability to disable VScript in a map (and fixed a few potential complications from disabling VScript) - Made clientside VScript only initialize after world is spawned in order to receive serverside script language in time - Added tons of VScript functions to CBaseAnimating related to bodygroups, sequences, etc. - Added VScript functions to players for getting user ID and player name, similar to logic_playerinfo - Added a few L4D2 script functions missing from the ASW SDK - Added "Localize" singleton with a single "GetTokenAsUTF8" function for getting localization strings - Disabled r_hunkalloclightmaps by the request of various users (apparently this completely removes the "Engine hunk overflow" error and allows for really high-res lightmaps) - Fixed npc_antlionguard NPC_TranslateActivity not hooking into base class (allows for VScript manipulation) - Added various unused antlion guard activities to npc_antlionguard AI, allowing for usage as registered activities - Added keyvalue to set LOS mask on combine_mine - Added +USE bounding box limiter to prop_interactable
This commit is contained in:
@@ -335,15 +335,32 @@ float CalculatePhysicsImpactDamage( int index, gamevcollisionevent_t *pEvent, co
|
||||
|
||||
if ( pEvent->pObjects[otherIndex]->GetGameFlags() & FVPHYSICS_PLAYER_HELD )
|
||||
{
|
||||
if ( gpGlobals->maxClients == 1 )
|
||||
// if the player is holding the object, use its real mass (player holding reduced the mass)
|
||||
CBasePlayer *pPlayer = NULL;
|
||||
|
||||
if ( 1 == gpGlobals->maxClients )
|
||||
{
|
||||
// if the player is holding the object, use it's real mass (player holding reduced the mass)
|
||||
CBasePlayer *pPlayer = UTIL_GetLocalPlayer();
|
||||
if ( pPlayer )
|
||||
pPlayer = UTIL_GetLocalPlayer();
|
||||
}
|
||||
else
|
||||
{
|
||||
// See which MP player is holding the physics object and then use that player to get the real mass of the object.
|
||||
// This is ugly but better than having linkage between an object and its "holding" player.
|
||||
for ( int i = 1; i <= gpGlobals->maxClients; i++ )
|
||||
{
|
||||
otherMass = pPlayer->GetHeldObjectMass( pEvent->pObjects[otherIndex] );
|
||||
CBasePlayer *tempPlayer = UTIL_PlayerByIndex( i );
|
||||
if ( tempPlayer && pEvent->pEntities[index] == tempPlayer->GetHeldObject() )
|
||||
{
|
||||
pPlayer = tempPlayer;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( pPlayer )
|
||||
{
|
||||
otherMass = pPlayer->GetHeldObjectMass( pEvent->pObjects[otherIndex] );
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: sum the mass of each object in this system for the purpose of damage
|
||||
@@ -438,16 +455,23 @@ float CalculatePhysicsImpactDamage( int index, gamevcollisionevent_t *pEvent, co
|
||||
}
|
||||
else if ( pEvent->pObjects[index]->GetGameFlags() & FVPHYSICS_PLAYER_HELD )
|
||||
{
|
||||
if ( gpGlobals->maxClients == 1 )
|
||||
// if the player is holding the object, use it's real mass (player holding reduced the mass)
|
||||
CBasePlayer *pPlayer = NULL;
|
||||
if ( 1 == gpGlobals->maxClients )
|
||||
{
|
||||
// if the player is holding the object, use it's real mass (player holding reduced the mass)
|
||||
CBasePlayer *pPlayer = UTIL_GetLocalPlayer();
|
||||
if ( pPlayer )
|
||||
pPlayer = UTIL_GetLocalPlayer();
|
||||
}
|
||||
else
|
||||
{
|
||||
// See which MP player is holding the physics object and then use that player to get the real mass of the object.
|
||||
// This is ugly but better than having linkage between an object and its "holding" player.
|
||||
for ( int i = 1; i <= gpGlobals->maxClients; i++ )
|
||||
{
|
||||
float mass = pPlayer->GetHeldObjectMass( pEvent->pObjects[index] );
|
||||
if ( mass > 0 )
|
||||
CBasePlayer *tempPlayer = UTIL_PlayerByIndex( i );
|
||||
if ( tempPlayer && pEvent->pEntities[index] == tempPlayer->GetHeldObject() )
|
||||
{
|
||||
invMass = 1.0f / mass;
|
||||
pPlayer = tempPlayer;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user