• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ MS2SEC函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中MS2SEC函数的典型用法代码示例。如果您正苦于以下问题:C++ MS2SEC函数的具体用法?C++ MS2SEC怎么用?C++ MS2SEC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了MS2SEC函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ResetShaderParms

/*
================
idEntityFx::ResetShaderParms
================
*/
void idEntityFx::ResetShaderParms( void ) {
	if ( !fxEffect ) {
		return;
	}
	for( int i = 0; i < fxEffect->events.Num(); i++ ) {
		const idFXSingleAction& fxaction = fxEffect->events[i];
		idFXLocalAction& laction = actions[i];
		
		if ( laction.lightDefHandle != -1 && fxaction.sibling == -1 && fxaction.type != FX_ATTACHLIGHT ) {
			laction.renderLight.shaderParms[ SHADERPARM_RED ]	= fxaction.lightColor.x;
			laction.renderLight.shaderParms[ SHADERPARM_GREEN ]	= fxaction.lightColor.y;
			laction.renderLight.shaderParms[ SHADERPARM_BLUE ]	= fxaction.lightColor.z;
			laction.renderLight.shaderParms[ SHADERPARM_TIMEOFFSET ] = -MS2SEC( gameLocal.time );
		}
		if ( laction.modelDefHandle != -1 && fxaction.sibling == -1 && fxaction.type != FX_ATTACHENTITY ) {
			laction.renderEntity.shaderParms[ SHADERPARM_RED ]		= 1.0f;
			laction.renderEntity.shaderParms[ SHADERPARM_GREEN ]	= 1.0f;
			laction.renderEntity.shaderParms[ SHADERPARM_BLUE ]		= 1.0f;
			if( manualFadeIsOn ){ //no need to reset it if we are not fading - this would make the particle to change position instantly
				laction.renderEntity.shaderParms[ SHADERPARM_TIMEOFFSET ] = -MS2SEC( gameLocal.time );
			}
			laction.renderEntity.shaderParms[ SHADERPARM_PARTICLE_STOPTIME ] = 0; //make particles to appear
		}
	}
}
开发者ID:alepulver,项目名称:dhewm3,代码行数:30,代码来源:Fx.cpp


示例2: assert

/*
================
rvClientEffect::Play
================
*/
bool rvClientEffect::Play ( int _startTime, bool _loop, const idVec3& endOrigin ) {
	if ( !renderEffect.declEffect ) {
		return false;
	}

	// Initialize the render entity
	if ( bindMaster ) {
		renderEntity_t* renderEnt = bindMaster->GetRenderEntity ( );
		assert( renderEnt );
		
		// Copy suppress values from parent entity
		renderEffect.allowSurfaceInViewID	 = renderEnt->allowSurfaceInViewID;
		renderEffect.suppressSurfaceInViewID = renderEnt->suppressSurfaceInViewID;
		renderEffect.weaponDepthHackInViewID = renderEnt->weaponDepthHackInViewID;
  	}

	renderEffect.shaderParms[SHADERPARM_RED] = 1.0f;
	renderEffect.shaderParms[SHADERPARM_GREEN] = 1.0f;
	renderEffect.shaderParms[SHADERPARM_BLUE] = 1.0f;
	renderEffect.shaderParms[SHADERPARM_ALPHA] = 1.0f;
	renderEffect.shaderParms[SHADERPARM_BRIGHTNESS] = 1.0f; 
	renderEffect.shaderParms[SHADERPARM_TIMEOFFSET] = MS2SEC( gameLocal.time ); 
	renderEffect.hasEndOrigin = ( endOrigin != vec3_origin );
	renderEffect.endOrigin	  = endOrigin;		
	renderEffect.loop		  = _loop;

	assert( effectDefHandle < 0 );

	renderEffect.startTime = MS2SEC( _startTime );

	return true;	
}
开发者ID:ET-NiK,项目名称:amxxgroup,代码行数:37,代码来源:ClientEffect.cpp


示例3: SetModel

/*
================
idLight::BecomeBroken
================
*/
void idLight::BecomeBroken( idEntity *activator ) {
	const char *damageDefName;

	fl.takedamage = false;

	if ( brokenModel.Length() ) {
		SetModel( brokenModel );

		if ( !spawnArgs.GetBool( "nonsolid" ) ) {
			GetPhysics()->SetClipModel( new idClipModel( brokenModel.c_str() ), 1.0f );
			GetPhysics()->SetContents( CONTENTS_SOLID );
		}
	} else if ( spawnArgs.GetBool( "hideModelOnBreak" ) ) {
		SetModel( "" );
		GetPhysics()->SetContents( 0 );
	}

	if ( gameLocal.isServer ) {

		ServerSendEvent( EVENT_BECOMEBROKEN, NULL, true, -1 );

		if ( spawnArgs.GetString( "def_damage", "", &damageDefName ) ) {
			idVec3 origin = renderEntity.origin + renderEntity.bounds.GetCenter() * renderEntity.axis;
			gameLocal.RadiusDamage( origin, activator, activator, this, this, damageDefName );
		}

	}

	ActivateTargets( activator );

	// offset the start time of the shader to sync it to the game time
	renderEntity.shaderParms[ SHADERPARM_TIMEOFFSET ] = -MS2SEC( gameLocal.time );
	renderLight.shaderParms[ SHADERPARM_TIMEOFFSET ] = -MS2SEC( gameLocal.time );

	// set the state parm
	renderEntity.shaderParms[ SHADERPARM_MODE ] = 1;
	renderLight.shaderParms[ SHADERPARM_MODE ] = 1;

	// if the light has a sound, either start the alternate (broken) sound, or stop the sound
	const char *parm = spawnArgs.GetString( "snd_broken" );
	if ( refSound.shader || ( parm && *parm ) ) {
		StopSound( SND_CHANNEL_ANY, false );
		const idSoundShader *alternate = refSound.shader ? refSound.shader->GetAltSound() : declManager->FindSound( parm );
		if ( alternate ) {
			// start it with no diversity, so the leadin break sound plays
			refSound.referenceSound->StartSound( alternate, SND_CHANNEL_ANY, 0.0, 0 );
		}
	}

	parm = spawnArgs.GetString( "mtr_broken" );
	if ( parm && *parm ) {
		SetShader( parm );
	}

	UpdateVisuals();
}
开发者ID:alepulver,项目名称:dhewm3,代码行数:61,代码来源:Light.cpp


示例4: SetOrigin

void hhDeathWraithEnergy::Ticker() {
	float theta;
	float radius;
	float z;

	if (!thePlayer.IsValid()) {
		return;
	}

	float alpha = (MS2SEC(gameLocal.time) - startTime) / duration;

	if (alpha < 1.0f) {

		if (thePlayer->DeathWalkStage2()) {
			SetOrigin( spline.GetValue(alpha) );
		}
		else {
			radius = startRadius + alpha*(endRadius-startRadius);
			theta = startTheta + alpha*(endTheta-startTheta);
			z = startZ + alpha * (endZ - startZ);

			idVec3 locationRelativeToCenter = CylindricalToCartesian(radius, theta, z);
			idEntity *destEntity = thePlayer->GetDeathwalkEnergyDestination();
			if (destEntity) {
				centerPosition = destEntity->GetOrigin();
			}

			SetOrigin(centerPosition + locationRelativeToCenter);
		}
	}
	else if (!IsHidden()) {
		Hide();
		StopSound(SND_CHANNEL_BODY);

		bool energyHealth = spawnArgs.GetBool("healthEnergy");

		idEntity *dwProxy = thePlayer->GetDeathwalkEnergyDestination();
		if (dwProxy) {
			// Spawn arrival effect
			StartSound("snd_arrival", SND_CHANNEL_ANY);

			dwProxy->SetShaderParm(SHADERPARM_TIMEOFFSET, -MS2SEC(gameLocal.time) );
			dwProxy->SetShaderParm(SHADERPARM_MODE, energyHealth ? 2 : 1 );
		}

		// Notify the player
		thePlayer->DeathWraithEnergyArived(energyHealth);

		PostEventMS(&EV_Remove, 5000);
	}

	hhPathEmitter::Ticker();
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:53,代码来源:game_misc.cpp


示例5: RAD2DEG

/*
================
idForce_Drag::Evaluate
================
*/
void idForce_Drag::Evaluate( int time ) {
	float l1, l2, mass;
	idVec3 dragOrigin, dir1, dir2, velocity, centerOfMass;
	idMat3 inertiaTensor;
	idRotation rotation;
	idClipModel *clipModel;

	if ( !physics ) {
		return;
	}

	clipModel = physics->GetClipModel( id );
	if ( clipModel != NULL && clipModel->IsTraceModel() ) {
		clipModel->GetMassProperties( 1.0f, mass, centerOfMass, inertiaTensor );
	} else {
		centerOfMass.Zero();
	}

	centerOfMass = physics->GetOrigin( id ) + centerOfMass * physics->GetAxis( id );
	dragOrigin = physics->GetOrigin( id ) + p * physics->GetAxis( id );

	dir1 = dragPosition - centerOfMass;
	dir2 = dragOrigin - centerOfMass;
	l1 = dir1.Normalize();
	l2 = dir2.Normalize();

	rotation.Set( centerOfMass, dir2.Cross( dir1 ), RAD2DEG( idMath::ACos( dir1 * dir2 ) ) );
	physics->SetAngularVelocity( rotation.ToAngularVelocity() / MS2SEC( USERCMD_MSEC ), id );

	velocity = physics->GetLinearVelocity( id ) * damping + dir1 * ( ( l1 - l2 ) * ( 1.0f - damping ) / MS2SEC( USERCMD_MSEC ) );
	physics->SetLinearVelocity( velocity, id );
}
开发者ID:anonreclaimer,项目名称:morpheus,代码行数:37,代码来源:Force_Drag.cpp


示例6: Event_Activate

END_CLASS

/*
================
idTarget_SetShaderTime::Event_Activate
================
*/
void idTarget_SetShaderTime::Event_Activate( idEntity *activator )
{
	int			i;
	idEntity	 *ent;
	float		time;
	
	time = -MS2SEC( gameLocal.time );
	for( i = 0; i < targets.Num(); i++ )
	{
		ent = targets[ i ].GetEntity();
		if( ent )
		{
			ent->SetShaderParm( SHADERPARM_TIMEOFFSET, time );
			if( ent->IsType( idLight::Type ) )
			{
				static_cast<idLight *>( ent )->SetLightParm( SHADERPARM_TIMEOFFSET, time );
			}
		}
	}
}
开发者ID:revelator,项目名称:MHDoom,代码行数:27,代码来源:Target.cpp


示例7: memset

/*
================
idExplodingBarrel::AddParticles
================
*/
void idExplodingBarrel::AddParticles( const char *name, bool burn ) {
	if ( name && *name ) {
		if ( particleModelDefHandle >= 0 ){
			gameRenderWorld->FreeEntityDef( particleModelDefHandle );
		}
		memset( &particleRenderEntity, 0, sizeof ( particleRenderEntity ) );
		const idDeclModelDef *modelDef = static_cast<const idDeclModelDef *>( declManager->FindType( DECL_MODELDEF, name ) );
		if ( modelDef ) {
			particleRenderEntity.origin = physicsObj.GetAbsBounds().GetCenter();
			particleRenderEntity.axis = mat3_identity;
			particleRenderEntity.hModel = modelDef->ModelHandle();
			float rgb = ( burn ) ? 0.0f : 1.0f;
			particleRenderEntity.shaderParms[ SHADERPARM_RED ] = rgb;
			particleRenderEntity.shaderParms[ SHADERPARM_GREEN ] = rgb;
			particleRenderEntity.shaderParms[ SHADERPARM_BLUE ] = rgb;
			particleRenderEntity.shaderParms[ SHADERPARM_ALPHA ] = rgb;
			particleRenderEntity.shaderParms[ SHADERPARM_TIMEOFFSET ] = -MS2SEC( gameLocal.realClientTime );
			particleRenderEntity.shaderParms[ SHADERPARM_DIVERSITY ] = ( burn ) ? 1.0f : gameLocal.random.RandomInt( 90 );

			particleRenderEntity.suppressSurfaceInViewID = -8;	// sikk - Depth Render

			if ( !particleRenderEntity.hModel ) {
				particleRenderEntity.hModel = renderModelManager->FindModel( name );
			}
			particleModelDefHandle = gameRenderWorld->AddEntityDef( &particleRenderEntity );
			if ( burn ) {
				BecomeActive( TH_THINK );
			}
			particleTime = gameLocal.realClientTime;
		}
	}
}
开发者ID:alepulver,项目名称:dhewm3,代码行数:37,代码来源:Moveable.cpp


示例8: GetAxis

END_CLASS

void hhShuttleTransport::Spawn() {
	dockingBeam = NULL;
	dockedShuttle = NULL;
	shuttleCount = 0;
	bLocked = false;

	amountHealth = spawnArgs.GetInt("amounthealth");
	amountPower = spawnArgs.GetInt("amountpower");

	bCanExitLocked = spawnArgs.GetBool("canExitLocked");
	bLockOnEntry = spawnArgs.GetBool("lockOnEntry");
	bAllowFiring = spawnArgs.GetBool("allowFiring");
	offsetNozzle = spawnArgs.GetVector("offset_nozzle1");
//	offsetNozzle2 = spawnArgs.GetVector("offset_nozzle2");
	offsetShuttlePoint = spawnArgs.GetVector("offset_shuttlepoint");

//	dockingBeam = SpawnDockingBeam(offsetNozzle);

	dockingForce.SetRestoreFactor(spawnArgs.GetFloat("dockingforce"));
	dockingForce.SetTarget(GetOrigin() + offsetShuttlePoint * GetAxis());

	// Fade in
	SetShaderParm(SHADERPARM_TIMEOFFSET, -MS2SEC(gameLocal.time));	// Growth start time
	SetShaderParm(5, 1.0f);											// Growth direction (in)
	SetShaderParm(6, 1.0f);											// Make Beam opaque
	StartSound("snd_fadein", SND_CHANNEL_ANY);
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:29,代码来源:game_shuttletransport.cpp


示例9: if

/*
================
idEntityFx::SetupFade
================
*/
void idEntityFx::SetupFade( void ) {
	int ieff;

	if ( !fxEffect ) {
		return;
	}

	for( ieff = 0; ieff < fxEffect->events.Num(); ieff++ ) {
		const idFXSingleAction& fxaction = fxEffect->events[ieff];
		idFXLocalAction& laction = actions[ieff];
		
		// turn on the waiting ones
		if ( laction.delay < 0 ) {
			laction.start = gameLocal.time; 
		}
		// turn off the ones which are not endless
		else if( fxaction.duration != 0 ){ //duration = 0 means endless. Turn off -1 ones too!
			laction.start = -1; 
		}

		//turn off particles
		if ( laction.modelDefHandle != -1 && fxaction.sibling == -1 && fxaction.type != FX_ATTACHENTITY ) {
			laction.renderEntity.shaderParms[ SHADERPARM_PARTICLE_STOPTIME ] = MS2SEC( gameLocal.time ); 
		}
	}
}
开发者ID:alepulver,项目名称:dhewm3,代码行数:31,代码来源:Fx.cpp


示例10: explicitTS

/*
================
idExplodingBarrel::AddParticles
================
*/
void idExplodingBarrel::AddParticles( const char* name, bool burn )
{
	if( name && *name )
	{
		int explicitTimeGroup = timeGroup;
		SetTimeState explicitTS( explicitTimeGroup );
		if( particleModelDefHandle >= 0 )
		{
			gameRenderWorld->FreeEntityDef( particleModelDefHandle );
		}
		memset( &particleRenderEntity, 0, sizeof( particleRenderEntity ) );
		idRenderModel* modelDef = renderModelManager->FindModel( name );
		if( modelDef )
		{
			particleRenderEntity.origin = physicsObj.GetAbsBounds().GetCenter();
			particleRenderEntity.axis = mat3_identity;
			particleRenderEntity.hModel = modelDef;
			float rgb = ( burn ) ? 0.0f : 1.0f;
			particleRenderEntity.shaderParms[ SHADERPARM_RED ] = rgb;
			particleRenderEntity.shaderParms[ SHADERPARM_GREEN ] = rgb;
			particleRenderEntity.shaderParms[ SHADERPARM_BLUE ] = rgb;
			particleRenderEntity.shaderParms[ SHADERPARM_ALPHA ] = rgb;
			particleRenderEntity.shaderParms[ SHADERPARM_TIMEOFFSET ] = -MS2SEC( gameLocal.realClientTime );
			particleRenderEntity.shaderParms[ SHADERPARM_DIVERSITY ] = ( burn ) ? 1.0f : gameLocal.random.RandomInt( 90 );
			particleRenderEntity.timeGroup = explicitTimeGroup;
			particleModelDefHandle = gameRenderWorld->AddEntityDef( &particleRenderEntity );
			if( burn )
			{
				BecomeActive( TH_THINK );
			}
			particleTime = gameLocal.realClientTime;
		}
	}
}
开发者ID:dcahrakos,项目名称:RBDOOM-3-BFG,代码行数:39,代码来源:Moveable.cpp


示例11: va

/*
=================
idTestModel::TestModel_f

Creates a static modelDef in front of the current position, which
can then be moved around
=================
*/
void idTestModel::TestModel_f( const idCmdArgs &args ) {
	idVec3			offset;
	idStr			name;
	idPlayer *		player;
	const idDict *	entityDef;
	idDict			dict;

	player = gameLocal.GetLocalPlayer();
	if ( !player || !gameLocal.CheatsOk() ) {
		return;
	}

	// delete the testModel if active
	if ( gameLocal.testmodel ) {
		delete gameLocal.testmodel;
		gameLocal.testmodel = NULL;
	}

	if ( args.Argc() < 2 ) {
		return;
	}

	name = args.Argv( 1 );

	entityDef = gameLocal.FindEntityDefDict( name, false );
	if ( entityDef ) {
		dict = *entityDef;
	} else {
		if ( declManager->FindType( DECL_MODELDEF, name, false ) ) {
			dict.Set( "model", name );
		} else {
			// allow map models with underscore prefixes to be tested during development
			// without appending an ase
			if ( name[ 0 ] != '_' ) {
				name.DefaultFileExtension( ".ase" );
			} 
			
			if ( strstr( name, ".ma" ) || strstr( name, ".mb" ) ) {
				idModelExport exporter;
				exporter.ExportModel( name );
				name.SetFileExtension( MD5_MESH_EXT );
			}

			if ( !renderModelManager->CheckModel( name ) ) {
				gameLocal.Printf( "Can't register model\n" );
				return;
			}
			dict.Set( "model", name );
		}
	}

	offset = player->GetPhysics()->GetOrigin() + player->viewAngles.ToForward() * 100.0f;

	dict.Set( "origin", offset.ToString() );
	dict.Set( "angle", va( "%f", player->viewAngles.yaw + 180.0f ) );
	dict.Set( "def_head", g_testModelHead.GetString());
	gameLocal.testmodel = ( idTestModel * )gameLocal.SpawnEntityType( idTestModel::Type, &dict );
	gameLocal.testmodel->renderEntity.shaderParms[SHADERPARM_TIMEOFFSET] = -MS2SEC( gameLocal.time );
}
开发者ID:dolanor,项目名称:TheDarkMod,代码行数:67,代码来源:Anim_Testmodel.cpp


示例12: SetShaderParm

void hhShuttleTransport::Event_FadeOut() {
	// Fade out
	SetShaderParm(SHADERPARM_TIMEOFFSET, -MS2SEC(gameLocal.time));	// Growth start time
	SetShaderParm(5, -1.0f);										// Growth direction (out)
	SetShaderParm(6, 0.0f);											// Make Beam translucent
	StartSound("snd_fadeout", SND_CHANNEL_ANY);

	PostEventMS(&EV_Remove, 1000);
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:9,代码来源:game_shuttletransport.cpp


示例13: MS2SEC

void hhFuncEmitter::Hide() {
	idStaticEntity::Hide();
	
	renderEntity.shaderParms[SHADERPARM_PARTICLE_STOPTIME] = MS2SEC( gameLocal.time );

	particleStartTime = -1;

	BecomeInactive( TH_TICKER );
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:9,代码来源:game_misc.cpp


示例14: MS2SEC

/*
=====================
idTestModel::TestParticleStopTime_f
=====================
*/
void idTestModel::TestParticleStopTime_f( const idCmdArgs &args ) {
	if ( !gameLocal.testmodel ) {
		gameLocal.Printf( "No testModel active.\n" );
		return;
	}

	gameLocal.testmodel->renderEntity.shaderParms[SHADERPARM_PARTICLE_STOPTIME] = MS2SEC( gameLocal.time );
	gameLocal.testmodel->UpdateVisuals();
}
开发者ID:AliKalkandelen,项目名称:quake4,代码行数:14,代码来源:Anim_Testmodel.cpp


示例15: Show

void hhFuncEmitter::Show() {
	idStaticEntity::Show();

	renderEntity.shaderParms[SHADERPARM_PARTICLE_STOPTIME] = 0;
	renderEntity.shaderParms[SHADERPARM_TIMEOFFSET] = -MS2SEC( gameLocal.GetTime() );

	particleStartTime = gameLocal.GetTime();

	BecomeActive( TH_TICKER );
}
开发者ID:mrwonko,项目名称:preymotionmod,代码行数:10,代码来源:game_misc.cpp


示例16: On

/*
================
idLight::On
================
*/
void idLight::On( void ) {
	currentLevel = levels;
	// offset the start time of the shader to sync it to the game time
	renderLight.shaderParms[ SHADERPARM_TIMEOFFSET ] = -MS2SEC( gameLocal.time );
	if ( ( soundWasPlaying || refSound.waitfortrigger ) && refSound.shader ) {
		StartSoundShader( refSound.shader, SND_CHANNEL_ANY, 0, false, NULL );
		soundWasPlaying = false;
	}
	SetLightLevel();
	BecomeActive( TH_UPDATEVISUALS );
}
开发者ID:alepulver,项目名称:dhewm3,代码行数:16,代码来源:Light.cpp


示例17: MS2SEC

/*
================
idAF::ChangePose

   Change the articulated figure to match the current animation pose of the given entity
   and set the velocity relative to the previous pose.
================
*/
void idAF::ChangePose( idEntity *ent, int time )
{
	int i;
	float invDelta;
	idAFBody *body;
	idVec3 origin, lastOrigin;
	idMat3 axis;
	idAnimator *animatorPtr;
	renderEntity_t *renderEntity;
	
	if( !IsLoaded() || !ent )
	{
		return;
	}
	
	animatorPtr = ent->GetAnimator();
	if( !animatorPtr )
	{
		return;
	}
	
	renderEntity = ent->GetRenderEntity();
	if( !renderEntity )
	{
		return;
	}
	
	// if the animation is driven by the physics
	if( self->GetPhysics() == &physicsObj )
	{
		return;
	}
	
	// if the pose was already updated this frame
	if( poseTime == time )
	{
		return;
	}
	invDelta = 1.0f / MS2SEC( time - poseTime );
	poseTime = time;
	
	for( i = 0; i < jointMods.Num(); i++ )
	{
		body = physicsObj.GetBody( jointMods[i].bodyId );
		animatorPtr->GetJointTransform( jointMods[i].jointHandle, time, origin, axis );
		lastOrigin = body->GetWorldOrigin();
		body->SetWorldOrigin( renderEntity->origin + ( origin + jointMods[i].jointBodyOrigin * axis ) * renderEntity->axis );
		body->SetWorldAxis( jointMods[i].jointBodyAxis * axis * renderEntity->axis );
		body->SetLinearVelocity( ( body->GetWorldOrigin() - lastOrigin ) * invDelta );
	}
	
	physicsObj.UpdateClipModels();
}
开发者ID:revelator,项目名称:MHDoom,代码行数:61,代码来源:AF.cpp


示例18: MS2SEC

/*
================
idSecurityCamera::Event_ContinueSweep
================
*/
void idSecurityCamera::Event_ContinueSweep( void ) {
	float pct = ( stopSweeping - sweepStart ) / ( sweepEnd - sweepStart );
	float f = gameLocal.time - ( sweepEnd - sweepStart ) * pct;
	int speed;
	sweepStart = f;
	speed = MS2SEC( SweepSpeed() );
	sweepEnd = sweepStart + speed;
	PostEventMS( &EV_SecurityCam_Pause, speed * ( 1.0 - pct ) );
	StartSound( "snd_moving", SND_CHANNEL_BODY, 0, false, NULL );
	SetAlertMode( SCANNING );
	sweeping = true;
}
开发者ID:nbohr1more,项目名称:Revelation,代码行数:17,代码来源:SecurityCamera.cpp


示例19: MS2SEC

/*
==============
idPlayerView::ClearEffects
==============
*/
void idPlayerView::ClearEffects() {
	lastDamageTime = MS2SEC( gameLocal.time - 99999 );

	dvFinishTime = ( gameLocal.time - 99999 );
	kickFinishTime = ( gameLocal.time - 99999 );

	for ( int i = 0 ; i < MAX_SCREEN_BLOBS ; i++ ) {
		screenBlobs[i].finishTime = gameLocal.time;
	}

	fadeTime = 0;
}
开发者ID:jaredmitch,项目名称:executable,代码行数:17,代码来源:PlayerView.cpp


示例20: ReturnFloat

/*
================
idThread::Event_GetTime
================
*/
void idThread::Event_GetTime()
{

	ReturnFloat( MS2SEC( gameLocal.realClientTime ) );
	
	/*  Script always uses realClient time to determine scripty stuff. ( This Fixes Weapon Animation timing bugs )
	if ( common->IsMultiplayer() ) {
		ReturnFloat( MS2SEC( gameLocal.GetServerGameTimeMs() ) );
	} else {
		ReturnFloat( MS2SEC( gameLocal.realClientTime ) );
	}
	*/
}
开发者ID:BielBdeLuna,项目名称:RBDoom3BFG-mirrored,代码行数:18,代码来源:Script_Thread.cpp



注:本文中的MS2SEC函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MSECS函数代码示例发布时间:2022-05-30
下一篇:
C++ MS函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap