Announcement

Collapse
No announcement yet.

Got any suggestions on fixing the progs106 source apart from QIP fixes?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I was under the impression he knew qc.
    Gnounc's Project Graveyard Gnounc's git repo

    Comment


    • #17
      I think he knows the basics but its been over 5 since he probably looked at it.

      Last year I wanted to start a project of taking a clean gpl code source and walking through the process of making a modern quake mod framework. Underlining the basic needs for a multiplayer fps mod, and such things as voteable map changes and a basic spectator function. Maybe I'll try to start that again...
      www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

      Comment


      • #18
        That's what most of my coding/learning has been headed towards.
        You should pick that back up, i should be getting my pc parts in the mail, I'll race ya.
        Gnounc's Project Graveyard Gnounc's git repo

        Comment


        • #19
          ill just post code as i go.
          www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

          Comment


          • #20
            if (self.classname == "R00k")
            self.health = self.health + 50;

            Comment


            • #21
              nah, way better if you do it like the matrix
              and everything just moves out of your way...

              Code:
              	e = findradius(self.origin, 128);
              	
              	while(e)
              	{
              		//if (e.classname=="missile" || e.classname=="grenade")
              		{
              			if (vlen(e.origin - self.origin) < 128)
              			{
              				dir = normalize(e.origin - self.origin);
              
              				dist = (128 - (vlen(e.origin - self.origin)));
              
              				e.velocity = e.velocity + dir * (dist * 3);
              			}
              		}   
              		e = e.chain;
              	}
              www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

              Comment


              • #22
                I'm partial to absorbing things into a puff of smoke.
                Code:
                void newGrenadeTouch() =
                {
                     If(other.netname=="gnounc")
                         self.think = becomeExplosion;
                     else
                         self.think=grenadeEplode; 
                
                     self.nextthink = time + 0.01;
                };
                Gnounc's Project Graveyard Gnounc's git repo

                Comment


                • #23
                  The QIP bugfix for the megahealth rot is too wasteful.

                  Id Software had a proper solution halfway coded, so I've just completed it. This is from Makaqu's items.qc:
                  Code:
                  void() health_touch =
                  {
                  
                  [...]
                  
                  	// Megahealth = rot down the player's super health
                  	if (self.healtype == 2)
                  	{
                  		// mankrip - begin
                  		if (other.items & IT_SUPERHEALTH) // player's super health is already being rotten down
                  		{
                  			if (deathmatch == 1 || deathmatch > 3)		// deathmatch 2 is the silly old rules
                  			{
                  				self.nextthink = time + 20;
                  				self.think = SUB_regen;
                  			}
                  		}
                  		else
                  		{
                  		// mankrip - end
                  		other.items = other.items | IT_SUPERHEALTH;
                  		self.nextthink = time + 5;
                  		self.think = item_megahealth_rot;
                  		self.owner = other;
                  		} // mankrip
                  	}
                  	else
                  
                  [...]
                  
                  }
                  The code also has a number of other niceties like this, which isn't a bugfix but eliminates some little annoyances (in this case, the pointless sounds of items respawning during intermission):
                  Code:
                  void() SUB_regen =
                  {
                  	if (intermission_running) // mankrip
                  		return; // mankrip
                  
                  [...]
                  
                  }
                  And it has a critical bug fixed in ExitIntermission:
                  Code:
                  void() ExitIntermission =
                  {
                  
                  [...]
                  
                  //
                  // run some text if at the end of an episode
                  //
                  	if (intermission_running == 2)
                  	{
                  
                  [...]
                  
                  // commented this out because it gives a "signon 1 when at 1" error message
                  // in some "map list" mods
                  //		GotoNextMap(); // mankrip - removed
                  	}
                  
                  	if (intermission_running == 3)
                  	{
                  
                  [...]
                  
                  	}
                  
                  	GotoNextMap();
                  };
                  The above bug happens because GotoNextMap is called twice when intermission_running is 2.
                  Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
                  ==-=-=-=-=-=-=-=-=-=-=-=
                  Dev blog / Twitter / YouTube

                  Comment


                  • #24
                    Cheers Mankrip!

                    Comment


                    • #25


                      digdogger
                      Want to get into playing Quake again? Click here for the Multiplayer-Startup kit! laissez bon temps rouler!

                      Comment


                      • #26
                        hmm interesting, never saw that error
                        this is what i have for mega

                        I noticed two things wrong,
                        1.> when u take multiple mega healths, they deplete exponentially faster, instead of 1 health per second.
                        2.> if u have regen rune it could sustain the mega from not ever respawning.
                        Code:
                        	if (donttake == 0)
                        	{
                        		sprint (other, "You receive ");
                        		s = ftos (self.healamount);
                        		sprint (other, s);
                        		sprint (other, " health\n");
                        		sound (other, CHAN_ITEM, self.noise, H_ROTTEN, ATTN_NORM);
                        		stuffcmd (other, "bf\n");
                        		self.model = string_null;
                        		self.solid = SOLID_NOT;
                        		self.owner = other;
                        	
                        		//MEGAHEALTH FIX
                        		if (self.healtype == H_MEGA)
                        		{
                        			MakeHealthRot(other,self);// create rot entity R00k: fixed
                        	
                        			other.items = other.items | IT_SUPERHEALTH;
                        	
                        			//Set this megahealth's respawn to default 125 seconds.
                        			if (deathmatch != 2)	// deathmatch 2 is silly old rules
                        			{
                        				self.nextthink = time + self.healamount + 25;	// delay (5) + health + respawn wait (20)
                        				self.think = SUB_regen;
                        			}
                        		}
                        		else
                        		{
                        			if ((deathmatch != 2))
                        			{
                        				self.nextthink = (time + 20);
                        				self.think = SUB_regen;
                        			}
                        		}
                        	}
                        Code:
                        void(entity rotowner, entity mega) MakeHealthRot =
                        {
                        	local entity rot;
                        	rot = spawn ();
                        	rot.classname = "health_rot";
                        	rot.nextthink = time + 5;
                        	rot.think = item_megahealth_rot;
                        	rot.owner = mega;	
                        	rot.enemy = rotowner;
                        	rot.enemy.rotthink = time + 5;//delay
                        };
                        Code:
                        //R00k had to change the rules for megahealth with runes enabled. Regen altered respawn timing.
                        //v3.2l
                        void () item_megahealth_rot =
                        {
                        	other = self.enemy;
                        	
                        	if ((((other.health > other.max_health) && (other.style & CLANRING_CONNECTED)) && !(other.style & CLANRING_OBSERVER)))
                        	{
                        		if (other.player_flag & ITEM_RUNE4_FLAG)//REGEN
                        		{			
                        			if (other.rotthink < (time - 100))//respawn megahealth after 100 seconds, which will wait 20 more, a total of 2 minutes since mega was taken. 
                        			{
                        				if (deathmatch != 2)
                        				{
                        					self.owner.nextthink = (time + 20);
                        					self.owner.think = SUB_regen;
                        				}
                        				remove(self);
                        			}
                        		}
                        		self.think = item_megahealth_rot;
                        		self.nextthink = (time + 1);
                        		return;
                        	}
                        
                        	//R00k: must still respawn mega 20 seconds AFTER other.health < other.max_health
                        	if (deathmatch != 2)
                        	{
                        		self.owner.nextthink = (time + 20);
                        		self.owner.think = SUB_regen;
                        	}
                        
                        	remove(self);
                        };
                        then at the bottom of checkpowerups

                        Code:
                        	//Multiple megahealth rot fix
                        	if ((self.items & IT_SUPERHEALTH) && (time > self.rotthink))
                        	{		
                        		if (self.health > self.max_health) 
                        		{
                        			if ((self.invincible_finished < time) && !(self.player_flag & ITEM_RUNE4_FLAG))//dont rot with regen
                        			{
                        				self.health = (self.health - 1.00);
                        				self.rotthink = (time + 1.00);
                        			}
                        		}
                        		else
                        		{
                        			self.items = self.items - (self.items & IT_SUPERHEALTH);
                        		}
                        	}
                        oddly i dont even have an exitintermission
                        only this...

                        Code:
                        void () GotoNextMap =
                        {
                        	/*if ((cvar ("samelevel") & 1))
                        	{
                        
                        	bprint("\nRestarting Map...Please Wait.\n");
                        	changelevel (mapname);
                        	}
                        	else
                        	*/
                        	{
                        		bprint("\nLoading Map...Please Wait.\n");
                        		changelevel (nextmap);
                        	}
                        };
                        
                        void () IntermissionThink =
                        {
                        	if ((!(self.style & CLANRING_OBSERVER) || (self.style & CLANRING_ADMINISTRATOR)))
                        	{
                        		self.angles = clanring_angle;
                        		self.v_angle = clanring_angle;
                        		self.fixangle = TRUE;		
                        	}
                        	if ((time < intermission_exittime))
                        	{
                        		return;
                        	}
                        	if (self.button0 || self.button2)
                        	{
                        		GotoNextMap ();
                        	}	
                        };
                        in player prethink
                        Code:
                        	if (gameover) //J.P. Grossman's intermission fix.
                        	{		
                        		self.style = (self.style | CLANRING_NO_POST_THINK);
                        		if (intermission_running)
                        		{
                        			IntermissionThink ();
                        		}
                        		return;
                        	}
                        Mankrip's version, while super optimized, seems to respawn megahealths 20 seconds after taken, regardless of the player's health, which for the hardcore purist multiplayer would change the rules
                        Last edited by R00k; 11-05-2014, 10:31 AM.
                        www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

                        Comment


                        • #27
                          Originally posted by R00k View Post
                          Mankrip's version, while super optimized, seems to respawn megahealths 20 seconds after taken, regardless of the player's health, which for the hardcore purist multiplayer would change the rules
                          I wasn't aware of regen runes and health-based timers. Are those from QuakeWorld?
                          Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
                          ==-=-=-=-=-=-=-=-=-=-=-=
                          Dev blog / Twitter / YouTube

                          Comment


                          • #28
                            the regen rune oversight it for 3wave
                            but iirc for standard Quake 1.06 the mega health will respawn 20 seconds
                            after self.health < self.max_health
                            so on dm3 u can grab mega outside run to the. computer room get that one
                            the. the one at mound and the 1st one u took outside wont respawn until the last one u took
                            wears off ; 20 seconds later.
                            www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

                            Comment


                            • #29
                              You're right.

                              Well, IIRC QIP's fix works the same as mine.

                              A workaround would be to set self.max_health=(other.health <= other.max_health) on the megahealth entity during the touch function, and to do other.health = other.health - self.max_health in the rot function instead of subtracting 1.
                              Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
                              ==-=-=-=-=-=-=-=-=-=-=-=
                              Dev blog / Twitter / YouTube

                              Comment


                              • #30
                                Eh, something like that i guess..

                                i've already had 8 beers, i'll just keep using what i have.

                                diggin for another fix... what's the fish count fix?

                                btw mankrip i like your work with the textures with the alpha channels!

                                very nice!

                                Last edited by R00k; 11-11-2014, 05:42 PM.
                                www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

                                Comment

                                Working...
                                X