Hello Seven. I hope you're right about the copyleft, I'm already used to these sounds. Thank you for sharing the info !
							
						
					Announcement
				
					Collapse
				
			
		
	
		
			
				No announcement yet.
				
			
				
	
Wait..you can get footstep sounds in Darkplaces?
				
					Collapse
				
			
		
	X
- 
	
	
		
		
		
		
		
		
		
	
	
 - 
	
	
		
		
		
		
		
		
		
	
	
Originally posted by Seven View Post@ Rook,
I would be very interested in your patch Rook.Code:void CL_Footsteps(entity_t *ent, int frame) { extern sfx_t *cl_sfx_step1; extern sfx_t *cl_sfx_step2; extern sfx_t *cl_sfx_step3; extern sfx_t *cl_sfx_step4; if (ent->steptime > cl.time) return; if (ent != &cl_entities[cl.viewentity]) return; if (!((ent->modelindex == cl_modelindex[mi_player])||(ent->modelindex == cl_modelindex[mi_md3_player]))) return; if (TruePointContents(ent->origin) != CONTENTS_EMPTY)// if in water etc.. no sound return; if (frame == 2 || frame == 5 || frame == 7 || frame == 10) { vec3_t dest, forward, right,up; trace_t trace; float f; int i,e; entity_t *p; AngleVectors (ent->angles, forward, right, up); VectorMA (ent->origin, -32, up, dest); Q_memset (&trace, 0, sizeof(trace_t)); trace.fraction = 1; SV_RecursiveHullCheck(cl.worldmodel->hulls, 0, 0, 1, ent->origin, dest, &trace); if (trace.fraction == 1) { ent->steptime = cl.time + 0.1;//R00k:(2.010) Since the player model animates at 10 frames per sec, no need to come back here until time + 1/10... return; } f = (rand()%4)+1; e = (int)cl.viewentity;//play my own footsteps locally if (f == 1) S_StartSound(e, 0, cl_sfx_step1, ent->origin, 0.40f, 1.0f); else if (f == 2) S_StartSound(e, 0, cl_sfx_step2, ent->origin, 0.40f, 1.0f); else if (f == 3) S_StartSound(e, 0, cl_sfx_step3, ent->origin, 0.40f, 1.0f); else S_StartSound(e, 0, cl_sfx_step4, ent->origin, 0.40f, 1.0f); ent->steptime = cl.time + 0.3; } }Last edited by R00k; 08-22-2010, 02:57 PM.
Comment
 - 
	
	
		
		
		
		
		
		
		
	
	
 - 
	
	
		
		
		
		
		
		
		
	
	
Has the source for Half-Life been released ?
I really dont know.
Can lxndr use these sounds for his engine then ?
Anyway,
if you are sensitive and pay attention to the footsteps sounds,
you will find the ones I posted above in many many Q1 mods available around.
Using them for a complete engine is of course something different... I guess.
I unfortunately dont know much about legal things,
so I leave it to the ones that have.
@ Rook
Thank you very much for your code.
A pity, you dont right one more word of explanation about it.
So I dont know in which .qc file I have to implement it.
But I guess its difficult and complicated, otherwise you would have surely write some words about it.
Greetings
Seven
Comment
 - 
	
	
		
		
		
		
		
		
		
	
	
okay, it's all in cl_main.c, but just to clarify, this only plays footsteps for YOUR player, ie singleplayer, not anyone else's footsteps in multiplayer so I dont wanna hear peeps crying h4x0r!
first create a cvar for footsteps, near the top of the file next to the other cvar definitions.
Register the cvar near the bottom of the file where u find the other registrations for cvarsCode:cvar_t cl_footsteps = {"cl_footsteps", "0", true};
Now in CL_RelinkEntities in the loop that runs through all the entities,Code:Cvar_RegisterVariable (&cl_footsteps);
somewhere before the if model->flags will be a good spot, add...Code:// start on the entity after the world for (i = 1, ent = cl_entities + 1 ; i < cl.num_entities ; i++, ent++) {
now scroll back up somewhere BEFORE CL_RelinkEntities and add the CL_Footsteps functionCode:if (cl_footsteps.value) CL_Footsteps(ent,ent->frame);
and finally, you need to assign the sound effects.Code:void CL_Footsteps(entity_t *ent, int frame) { extern sfx_t *cl_sfx_step1; extern sfx_t *cl_sfx_step2; extern sfx_t *cl_sfx_step3; extern sfx_t *cl_sfx_step4; if (ent->steptime > cl.time) return; if (ent != &cl_entities[cl.viewentity]) return; if (!((ent->modelindex == cl_modelindex[mi_player])||(ent->modelindex == cl_modelindex[mi_md3_player]))) return; if (TruePointContents(ent->origin) != CONTENTS_EMPTY)// if in water etc.. no sound return; if (frame == 2 || frame == 5 || frame == 7 || frame == 10) { vec3_t dest, forward, right,up; trace_t trace; float f; int i,e; entity_t *p; AngleVectors (ent->angles, forward, right, up); VectorMA (ent->origin, -32, up, dest); Q_memset (&trace, 0, sizeof(trace_t)); trace.fraction = 1; SV_RecursiveHullCheck(cl.worldmodel->hulls, 0, 0, 1, ent->origin, dest, &trace); if (trace.fraction == 1) { ent->steptime = cl.time + 0.1;//R00k:(2.010) Since the player model animates at 10 frames per sec, no need to come back here until time + 1/10... return; } f = (rand()%4)+1; e = (int)cl.viewentity;//play my own footsteps locally if (f == 1) S_StartSound(e, 0, cl_sfx_step1, ent->origin, 0.40f, 1.0f); else if (f == 2) S_StartSound(e, 0, cl_sfx_step2, ent->origin, 0.40f, 1.0f); else if (f == 3) S_StartSound(e, 0, cl_sfx_step3, ent->origin, 0.40f, 1.0f); else S_StartSound(e, 0, cl_sfx_step4, ent->origin, 0.40f, 1.0f); ent->steptime = cl.time + 0.3; } }
open up cl_tent.c and add near the top
and in CL_InitTEnts, load them...Code:sfx_t *cl_sfx_step1; sfx_t *cl_sfx_step2; sfx_t *cl_sfx_step3; sfx_t *cl_sfx_step4; sfx_t *cl_sfx_step5;
That's it!Code:cl_sfx_step1 = S_PrecacheSound ("misc/step1.wav"); cl_sfx_step2 = S_PrecacheSound ("misc/step2.wav"); cl_sfx_step3 = S_PrecacheSound ("misc/step3.wav"); cl_sfx_step4 = S_PrecacheSound ("misc/step4.wav");
							
						Last edited by R00k; 08-22-2010, 03:04 PM.
Comment
 - 
	
	
		
		
		
		
		
		
		
	
	
True. Two things are possible, a player can use his own custom sounds for "player" footsteps, or set cl_footstep 0 and use the sounds the mod provides.
The default is OFF and even if enabled it only supports a single generic sound type for all surfaces. It's really meant for mods that dont have footstep sounds, like Malice, but for players who like the pitter-pat of lil feet.
Comment
 - 
	
	
		
		
		
		
		
		
		
	
	
...
I'll just rip the code out so there's no issue. Besides a quakeC solution, a better way would be CSQC.
							
						Last edited by R00k; 08-23-2010, 01:28 PM.
Comment
 - 
	
	
		
		
		
		
		
		
		
	
	
Ideally, the engine should provide the default functionalities, which in turn could be override/improved by mods.
But considering the number of mods and engines, there's a crucial need for a common protocol, often called standards. As there's none actually, we could define it just right here.engine: quore.free.fr
Comment
 - 
	
	
		
		
		
		
		
		
		
	
	
Ya, client-side quakeC code can be provided by the mod author for use with their mod. It can even use DarkSnow's footstep code, with a few changes for implementation, and using DarkPlaces features for texture lookup. In return, any engine that supports the functionality of CSQC can also use that code to facilitate footsteps for any other mod. DarkPlaces just so happens to also support CSQC. The original post of this thread was for footsteps in DP, not engine_xyz, or my_quakeC_mod.Originally posted by lxndr View PostIdeally, the engine should provide the default functionalities,
							
						
Comment
 - 
	
	
		
		
		
		
		
		
		
	
	
I have no idea how CSQC works, I guess it's time to me to look into DP/FTE code.engine: quore.free.fr
Comment
 - 
	
	
		
		
		
		
		
		
		
	
	
DeathMatch Essentials v1.1 has footsteps for single player quake...i use doom3 player step wavs for it though becuase the mod sounds werent loud enough for me.
i like the mod but it has these sprite particles that look bad...if you run sprites it should look great.
i had to look around to find the zip file for this mod...i think havoc used some of this mods code for dpmod.
Comment
 - 
	
	
		
		
		
		
		
		
		
	
	
I would think that DME used havoc's code, since LH has a PhD in Quake
							
						
Comment
 
Comment