Forum

Great Drunk or Disoriented Effect!

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Postby Jukki » Thu Feb 24, 2011 9:39 am

DONT DIS THE MIGHTY MASTER CHIEF :@

On topic, This thing is great. I can finaly add some idle sawy to my sniper. Just thinking. Is there similiar like this but it would only effect weaponmodel?
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Postby Ranger366 » Thu Feb 24, 2011 9:42 am

Jukki wrote:Is there similiar like this but it would only effect weaponmodel?


I don't think so, as i said - modify the code, its easy as writing a forum post. Telejano made it gunmodel only, check it out.

btw im always having fun with Baker, we are like homies.
User avatar
Ranger366
 
Posts: 203
Joined: Thu Mar 18, 2010 5:51 pm

Postby Chrispy » Fri Feb 25, 2011 6:22 am

Nice discovery by the way.

I've done similar and editted the code so only the weapon sway works. But I've no idea how to only enable it when the player's running... right now it just plays when the player is idle. :P
Chrispy
 
Posts: 15
Joined: Fri Feb 25, 2011 3:39 am

Postby Ranger366 » Fri Feb 25, 2011 8:27 am

Chrispy wrote:Nice discovery by the way.

I've done similar and editted the code so only the weapon sway works. But I've no idea how to only enable it when the player's running... right now it just plays when the player is idle. :P


For me, v_idescale is active all the time - even if you move.
User avatar
Ranger366
 
Posts: 203
Joined: Thu Mar 18, 2010 5:51 pm

Postby Chrispy » Fri Feb 25, 2011 9:49 am

Ranger366 wrote:
Chrispy wrote:Nice discovery by the way.

I've done similar and editted the code so only the weapon sway works. But I've no idea how to only enable it when the player's running... right now it just plays when the player is idle. :P


For me, v_idescale is active all the time - even if you move.


That's true when you just use v_idlescale by itself, but I recall when I was editting the code (to make it so that only the weapon sways and not the player view), it didn't work while running. So it's something I need to try and fix.
Chrispy
 
Posts: 15
Joined: Fri Feb 25, 2011 3:39 am

Postby Ranger366 » Fri Feb 25, 2011 9:52 am

Chrispy i know how to solve this, but im currently at a scool computer and don't have access to the code.
User avatar
Ranger366
 
Posts: 203
Joined: Thu Mar 18, 2010 5:51 pm

Postby MauveBib » Fri Feb 25, 2011 6:29 pm

Ranger366 wrote:I should ask what you did when you were 15.


That's about the age I started QC coding.
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Postby Ranger366 » Fri Feb 25, 2011 6:52 pm

MauveBib wrote:
Ranger366 wrote:I should ask what you did when you were 15.


That's about the age I started QC coding.


Interesting, im impressed by the work you've done.
i also can do alot other things, i still dont know which of my skills will get enhanced in the future - i hope the Quake modding communty see's the potencial in me.

Haha i sound like a retard now :lol:
User avatar
Ranger366
 
Posts: 203
Joined: Thu Mar 18, 2010 5:51 pm

Postby behind_you » Sun Feb 27, 2011 10:33 am

Chrispy wrote:Nice discovery by the way.

I've done similar and editted the code so only the weapon sway works. But I've no idea how to only enable it when the player's running... right now it just plays when the player is idle. :P


Plz could u post the code to make it do this?
User avatar
behind_you
 
Posts: 237
Joined: Sat Feb 05, 2011 6:57 am
Location: Tripoli, Libya

Postby Chrispy » Sun Feb 27, 2011 6:04 pm

behind_you wrote:
Chrispy wrote:Nice discovery by the way.

I've done similar and editted the code so only the weapon sway works. But I've no idea how to only enable it when the player's running... right now it just plays when the player is idle. :P


Plz could u post the code to make it do this?


I wouldn't exactly consider this to be good code editting but what I did was go into view.c, and found this (around lines 753-755):

Code: Select all
   cl.viewent.angles[ROLL] -= v_idlescale.value * sin(cl.time*v_iroll_cycle.value) * v_iroll_level.value;
   cl.viewent.angles[PITCH] -= v_idlescale.value * sin(cl.time*v_ipitch_cycle.value) * v_ipitch_level.value;
   cl.viewent.angles[YAW] -= v_idlescale.value * sin(cl.time*v_iyaw_cycle.value) * v_iyaw_level.value;


Replace the "v_idlescale.value" with some number... e.g. 45 or 90.

So it looks like:

Code: Select all
   cl.viewent.angles[ROLL] -= 45 * sin(cl.time*v_iroll_cycle.value) * v_iroll_level.value;
   cl.viewent.angles[PITCH] -= 45 * sin(cl.time*v_ipitch_cycle.value) * v_ipitch_level.value;
   cl.viewent.angles[YAW] -= 45 * sin(cl.time*v_iyaw_cycle.value) * v_iyaw_level.value;


However, as I said, this probably doesn't work when you're running, only when you're idle. And the way I've done it is kinda hacky... e.g. it would be better to make a cvar which only enables gun sway.
Chrispy
 
Posts: 15
Joined: Fri Feb 25, 2011 3:39 am

Previous

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest