I was under the impression he knew qc.
Announcement
Collapse
No announcement yet.
Got any suggestions on fixing the progs106 source apart from QIP fixes?
Collapse
X
-
-
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...
Comment
-
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.
Comment
-
ill just post code as i go.
Comment
-
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; }
Comment
-
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; };
Comment
-
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 [...] }
Code:void() SUB_regen = { if (intermission_running) // mankrip return; // mankrip [...] }
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(); };
Comment
-
digdoggerWant to get into playing Quake again? Click here for the Multiplayer-Startup kit! laissez bon temps rouler!
Comment
-
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); };
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); } }
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 (); } };
Code:if (gameover) //J.P. Grossman's intermission fix. { self.style = (self.style | CLANRING_NO_POST_THINK); if (intermission_running) { IntermissionThink (); } return; }
Last edited by R00k; 11-05-2014, 10:31 AM.
Comment
-
Originally posted by R00k View PostMankrip'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
Comment
-
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.
Comment
-
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.
Comment
-
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.
Comment
Comment