Anchor
#1652 posted by madfox on 2015/08/01 09:56:57
I had my old 3dxf vodoo card,
and saw there was a retexturing project in 2008.
Games like Unreal and Rune have a fine look with it.
So I'm not the only tin can in the ocean, but I sure would like to make
maps for it. It would make the game's potential so much larger.
Hi Warren!
#1653 posted by Shambler on 2015/08/22 20:23:44
#1654 posted by JneeraZ on 2015/08/22 20:29:37
WTF? Couldn't find it.
Anyway ... thanks!
My question for those who are in the know is this ... in the monster death routines, does it add any efficiency to change this:
void() wiz_death8 =[ $death8, wiz_death8 ] {};
Into this:
void() wiz_death8 =[ $death8, SUB_Null ] {};
It seems like in the original code it will just loop forever on the corpse setting the last death frame for all time.
Why is SUB_Null a terrible idea?
#1655 posted by necros on 2015/08/22 21:28:03
you are correct, it does loop forever.
doing sub_null is a good idea and I don't know why ID chose not to do that. it's possible that at the time they were doing the scripts that entities had to be 'active' with a nextthink and valid think to be able to move (this is how bsp movers work, for example).
what i prefer doing is to make an ai_dead() method that i run at the end of any monsters death anim. this way I can hook things in easily to all monsters and in this method, i'd just do a self.think = SUB_NULL; along with a self.nextthink = 0.
if you really want to be nuts, doing self.nextthink = 0 is probably the most efficient because that will cause it to never think with a single operation. but that's just getting silly. ;) ;)
Deez Nuts!
Got eeeem!
#1657 posted by JneeraZ on 2015/08/23 21:44:01
So, here we are again ... Is there any way to use the "cvar_set" function without it spamming to the screen?
For example:
cvar_set ("sv_gravity", ftos(self.count));
Works great but it spams the fact that's changing it to the screen...
#1658 posted by necros on 2015/08/23 21:50:27
is using stuffcmd an option?
#1659 posted by JneeraZ on 2015/08/23 22:00:31
Good idea, but it spams the results too.
I mean, it's not terrible but it's less clean looking ...
???
#1660 posted by mfx on 2015/08/23 22:04:13
/n /n /n
/n
/n
#1661 posted by mfx on 2015/08/23 22:05:39
/not
#1662 posted by necros on 2015/08/23 22:45:26
it does? i have used stuffcmd a lot, i honestly don't remember it doing that. :(
#1663 posted by JneeraZ on 2015/08/23 23:01:45
Maybe changing the gravity is a special case ... it actually lies too. It says gravity has been set to the older value instead of the current one. It's a major troll.
#1664 posted by JneeraZ on 2015/08/23 23:01:57
stuffcmd ( player, "sv_gravity " );
stuffcmd ( player, ftos(self.count) );
stuffcmd ( player, "\n" );
Technical Tip
#1665 posted by Preach on 2015/08/23 23:16:17
You should use servercmd instead of stuffcmd, because in coop the player may not have the rights to change server settings. Not sure if it spams the console less...
#1666 posted by JneeraZ on 2015/08/23 23:55:59
My QuakeC has never heard of servercmd or server_cmd ... ?? Google is coming up pretty dry as well.
#1667 posted by necros on 2015/08/24 00:04:42
i think he meant localcmd. executes commands as if they were typed on the server's console. (stuffcmd is like if the player types it)
Oh Cool
#1668 posted by necros on 2015/08/24 00:06:54
http://www.gamers.org/dEngine/quake/spec/quake-spec34/qc-menu.htm
is useful. i remember printing this out way back... lots of nice info in there and easy to sort through. see 8.10 for localcmd.
#1669 posted by JneeraZ on 2015/08/24 00:33:06
Thanks for trying but, no, same ...
#1670 posted by JneeraZ on 2015/08/24 00:33:32
Might be that changing gravity is just one of those things that Quake feels the need to tell everyone about. :)
#1671 posted by necros on 2015/08/24 00:39:38
ohh bizarre, i just noticed that. i think that is the only (or one of the very few?) variables that, when changed, prints text to the console.
whelp, you can try mfx's suggestion of just adding 3 extra '/n's to push that output away, but they'd have to be on the NEXT frame, so you couldn't just do localcmd("sv_gravity 100\n\n\n\n\n");
you'd need to track when you changed the gravity, and then next frame run the newlines on stuffcmd for EACH client. ugh.....
#1672 posted by JneeraZ on 2015/08/24 00:45:25
I tried setting it up so it would think 0.1 seconds later, jam 3 newlines in but it seems to ignore those for whatever reason. Nothing happens.
Unless there's an elegant solution, I'll just live with it. Chalk it up to Quake being Quake...
#1673 posted by metlslime on 2015/08/24 00:50:10
Try setting .gravity on every entity individually?
#1674 posted by metlslime on 2015/08/24 00:50:33
How does quake do it for e1m8?
#1675 posted by JneeraZ on 2015/08/24 01:08:44
E1M8 is a QuakeC hack ...
cvar_set ("sv_gravity", "100");
I guess they don't care that it spams the message out. Or maybe you just don't notice it during the level load, I dunno ...
It's right at the very top of "void() worldspawn" ...
#1676 posted by necros on 2015/08/24 01:29:18
yeah, i think at the time that command is run, the player isn't spawned in yet, so they never receive the message.
try using metl's suggestion of setting .gravity while cycling through every entity in the map with find()... it's goofy, but it'd work quietly.
|