0 Members and 1 Guest are viewing this topic.
/*This is the major part of the code that runs bullet time.Impulse 110 is run, and checks if bullet time is on, then run BulletTimeTurnOn(), otherwise, run BulletTimeTurnOff().*/void CHL2_Player::BulletTimeTurnOn( void ){ if( m_HL2Local.m_flSuitPower < 50 ) { CPASAttenuationFilter filter( this ); filter.UsePredictionRules(); EmitSound( filter, entindex(), "HL2Player.SprintNoPower" ); return; } if( !SuitPower_AddDevice( SuitDeviceBulletTime ) ) return; //Stupid me, this never gets called >.>// #ifdef CLIENT_DLL// engine->ClientCmd_Unrestricted("host_timescale 0.2");// #endif CPASAttenuationFilter filter( this ); filter.UsePredictionRules(); EmitSound( filter, entindex(), "HL2Player.SprintStart" );// engine->ClientCommand( INDEXENT( entindex() ), "bulletimeon" ); engine->ServerCommand("sv_cheats 1; host_timescale 0.2;\n"); m_fBulletTimeOn = true;}//-----------------------------------------------------------------------------//-----------------------------------------------------------------------------void CHL2_Player::BulletTimeTurnOff( void ){ if ( m_HL2Local.m_bitsActiveDevices & SuitDeviceBulletTime.GetDeviceID() ) { SuitPower_RemoveDevice( SuitDeviceBulletTime ); }// engine->ClientCommand( INDEXENT( entindex() ), "bulletimeoff" ); engine->ServerCommand("sv_cheats 1; host_timescale 1.0;\n");// #ifdef CLIENT_DLL// engine->ClientCmd_Unrestricted("host_timescale 1.0");// #endif m_fBulletTimeOn = false;}/*Somewhere else, it checks if bullet time is running and sucks the power out of the AUX thingy at a really slow rate. I wuv taking computer science, it improved my coding a lot more.*/
I don't see anything here a simple bind chain can't do.
Didn't mean to insult your work. It looks like you're slowly adding more to this. Look forward to what else you have to add.
Quote from: Fidchell on December 03, 2012, 03:09:46 AMDidn't mean to insult your work. It looks like you're slowly adding more to this. Look forward to what else you have to add.I just got the kicking view model to work... Right after I removed to working attack code for kicking. >.>All this code will be on the github for my mod.EDIT:I'm getting some rather good progress on this mod, though if I really wanted to remake SMOD... Map Add would be the most painful for be to remake.
ConVar kick_throwforce( "kick_throwforce", "20", FCVAR_ARCHIVE, "The default throw force of kick without player velocity." );ConVar kick_damage( "kick_damage", "50", FCVAR_ARCHIVE, "The default damage of kick without player velocity." );ConVar kick_throwforce_mult( "kick_throwforce_mult", "1", FCVAR_ARCHIVE, "The multiplier for kick force." );ConVar kick_damage_mult( "kick_damage_mult", "1", FCVAR_ARCHIVE, "The multiplier for kick damage." );ConVar kick_throwforce_div( "kick_throwforce_div", "48", FCVAR_ARCHIVE, "Divide the velocity by this." );ConVar kick_damage_div( "kick_damage_div", "48", FCVAR_ARCHIVE, "Divide the velocity by this." );
I must know that leaning on wall script, that would make my modification perfect.