[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - ScratchCSQC?

ScratchCSQC?

Discuss CSQC related programming.

Moderator: InsideQC Admins

Re: ScratchCSQC?

Postby Seven » Wed Jun 17, 2015 6:00 pm

Hello toneddu2000,

Thank you for post. I am glad that it works in fte. dp doesnt do me that favour :)
It is not a drama. I know now that csqc is not for me and that is ok.


Hello Spike,

Thank you very much for extending the "types" in your fteqcc. Now it compiles smc just fine.
The progs.dat became even smaller compared to older fteqcc version. :)

Some people tend to forget that it is you who makes Quake modding possible.
Without you Spike, I would not even be able to compile the messy gamecode of smc. frikqcc isnt working.
Others would not be able to use csqc. And the list is even longer...

So, Thank you very much for beeing here for us modders and make Quake modding (with extensions) possible !

Quake wouldnt be what it is without people and devs like you.
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: ScratchCSQC?

Postby toneddu2000 » Wed Jun 17, 2015 9:30 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: ScratchCSQC?

Postby Seven » Thu Jun 18, 2015 3:51 pm

Hi toneddu2000,

Your code works I see the correct value on the centerprint, but the player is spawned in every map at coordinate '0 0 0' and cannot move.
No monsters are spawned as well.

I think we must not put the player into/through csqc, because there is no code to update him.
There must be a way to only give the world.worldtype value to csqc without manipulating the player (self).

Maybe Spike can help here ?

I am already happy that I see the correct world.worldtype value on the screen now. :)
Maybe it is now only a small edit to leave the player entity as it is, so that he starts at map spawnpoint and not at '0 0 0' ?

I already tried to use this inside ssqc´s PutClientInServer:
world.SendEntity = SendWorldType;
instead of this:
self.SendEntity = SendWorldType;

That fixes the player spawn position and all monsters are there as well, but the .worldtype value is again always '0' :?

Such a small value and such a big effort to bring it over... :)


EDITED:
Your code makes the function: CSQC_Ent_Update() mandatory.
I didnt have it in the csqc code until then, I fear that this the culprit for the player cannot move and is spawned at maps origin ?
Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: ScratchCSQC?

Postby Spike » Thu Jun 18, 2015 6:17 pm

.SendEntity in ssqc causes the entity to be sent via the 'csqc shared entity' protocol _INSTEAD_ of the engine's normal protocol.
The client forwards the actual entity data to the csqc for the csqc to parse. The data itself is in a format that is completely unknowable to the client - the only thing the client knows is the entity number (and with that, it maintains context so that it can retain the same 'self' value for each call to CSQC_Ent_Update).
So yeah, the csqc is required to call readcoord etc and store that into the ent's .origin etc.
If the csqc wants the entity to be visible, the csqc can either explicitly call addentity on the entity, or set .drawmask to something so that the addentities builtin can add the entity (yay for bulk processing, this also provides the predraw notification just before the implicit addentity call, and is the normal way to interpolate or animate entities or other things that must be done per-frame).

seven, in your case, you might want to spawn some entity in worldspawn (not world itself as world is not normally networked). with that entity, you can then use customizeentityforclient and setorigin the entity to match the client's origin, thus ensuring that it does not leave the player's pvs. you will need to set a model in order to make dp happy (fte does not require this step).
so yeah, just use this single other entity instead of the player/world. job done.

using a 'shared' player is possible, but its really really messy, primarily because it requires quite a lot of hoops for you to jump through, and then it presents you with a lot of expectations that you must match existing features (read: prediction). These are not easy.
You can still query the player's position via getentity, of course, just make sure that you don't set SendEntity on ssqc's player entities until you're ready.

but yeah, the easiest way *should* be stats.
you could also parse periodic stuffcmds or something, maybe with a clientcommand sent from CSQC_Init so the ssqc knows to resend stuff after a loaded saved game.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: ScratchCSQC?

Postby Seven » Thu Jun 18, 2015 7:08 pm

Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: ScratchCSQC?

Postby toneddu2000 » Fri Jun 19, 2015 8:22 am

Glad you made it working, Seven. The example I post you it wasn't meant to be complete, it was just an explanation about how SendEntity works. The player didn't move because the placeholder position was at '0 0 0', instead of self.position.
Usually you set this kind of position for things that don't move (like a message to be sent or a variable like score or so).
Usually, you update SendFlags in PlayerPostThink, otherwise player remains still at middle air.
If you want to make a fully CSQC client-server relationship, you can write, in your send function, all the values that need to be shared with CSQC (origin,angles,velocity,v_angle,health,weapon,etc.) and read the same values in CSQC by CSQC_EntUpdate (premitting the ENT_ constant in a switch or if/else cycle to distinguish every entity reading). Remember that vectors need to be split in self.origin_x = WriteCoord();self.origin_x = readcoord(); and so on. Don't use WriteShort / readshort or your movements will result laggy (I tried first! :lol: ).

Cheers
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: ScratchCSQC?

Postby drm_wayne » Wed Nov 04, 2015 8:21 am

Has anybody made something out of shpulds baseqc?
For some reason i cant get viewmodels get to work... i replaced the pistol.iqm with my own md3,
but it doesnt show up ingame :/
User avatar
drm_wayne
 
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: ScratchCSQC?

Postby toneddu2000 » Wed Nov 04, 2015 8:31 am

No, I don't use Shpuld's code but mine, and I can say that the only method I could use, to display a viewmodel is to use the renderflag RF_VIEWMODEL in csqc. Hope it helps.
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: ScratchCSQC?

Postby toneddu2000 » Sun Nov 08, 2015 5:52 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Previous

Return to CSQC Programming

Who is online

Users browsing this forum: No registered users and 1 guest