Spring:1944 dev and testing - Page 55

Spring:1944 dev and testing

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

This is going to be a problem in every game / mod that doesn't provide a pitch parameter to all mobile builders (iow, the vast majority). It's just the way that Spring now expects COBs to return this. Probably should default to a value of 0, instead of creating a stack error, but meh, that's what's going on.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post by submarine »

ah ok, i dont know much about cob scripting; s44 was just the only mod (i tested aai with pure (@argh: btw, really nice effects *g*) , ba and xta) who showed that behaviour
User avatar
BlackLiger
Posts: 1371
Joined: 05 Oct 2004, 21:58

Post by BlackLiger »

Including the Churchile AVRE?

That's gotta be my favorate tank of them all, simply because it IS a demolition tank.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Argh wrote:This is going to be a problem in every game / mod that doesn't provide a pitch parameter to all mobile builders (iow, the vast majority). It's just the way that Spring now expects COBs to return this. Probably should default to a value of 0, instead of creating a stack error, but meh, that's what's going on.
Which idiot did this?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I think that was KDR_11r... be nice, I think Peet requested it for Simbaes, and it's potentially useful. Just add another parameter to your mobile builder scripts, like so:

Code: Select all

StartBuilding(heading,pitch)
... that's all you need to do. You don't actually have to do anything with the parameter, just supply it. I agree with you, it shouldn't have been written this way (it'll probably break all of the OTA mods until their maintainers get un-lazy and learn how to use Scriptor for a second, omg), but that's what's going on. "Lucky" for me, I was the first game being tested heavily in SVN, so I saw this first. Should be easy enough to fix in Spring- just supply 0 if the parameter is undefined, so that the stacksize is correct, I would think...
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Yeah, but it seems Nemo has done something with our infantry includes which means none of the infantry builders will recompile.

So we're screwed unless I figure out wth they won't compile.


I'm also pissed off with Spiked for not noticing this as he was doing SVN testing. Rargh. :(
Last edited by FLOZi on 20 Dec 2007, 20:16, edited 1 time in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Eh? What? Decrypt the COBs, then, and yank the #includes out...
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Well it was KDR who added the pitch, and Tobi who modified the stack to make errors when a function has the wrong number of parameters...yes, it should definitely not complain about having too few parameters in a function.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

It's not that it shouldn't be a problem, Peet. It's that it should default to a value of 0 for that parameter, instead of spewing errors to chat and infolog, and ultimately being a cause of desync, which is the big issue, 'specially for backwards compatibility / lazy modders :roll:
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Peet wrote:yes, it should definitely not complain about having too few parameters in a function.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Sorry, I read that as, "don't bother showing errors". My bad.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Anyway.

I'm calm. 8)

yuritch (PRAISE BE UPON HIM, MORTALS) found the revision where nemo had replaced all the infantry includes with new ones which were 'not ready yet. don't recompile infantry scripts'. Why he didn't branch them I don't know. So, fixed.

Pain in the arse though. Especially as I'd just submitted to LordMatt :lol: :cry:
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Oh, for the love of.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

According to submarine the latest SVN no longer bitches about it anyway. :lol: :x
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

FLOZi wrote:
Argh wrote:This is going to be a problem in every game / mod that doesn't provide a pitch parameter to all mobile builders (iow, the vast majority). It's just the way that Spring now expects COBs to return this. Probably should default to a value of 0, instead of creating a stack error, but meh, that's what's going on.
Which idiot did this?
I did it, and I will not revert it, unless you want moar sync errors (it was accessing the stack vector outside it's bounds.)

If it can be argued default arguments that are always set to 0 if not given is a feature of COB (is there a COB spec anywhere?..guess not), then feel free to modify it again. I just don't like Spring's default behaviour of just desyncing/crashing instead of giving a decent error message.
Argh wrote: It's not that it shouldn't be a problem, Peet. It's that it should default to a value of 0 for that parameter, instead of spewing errors to chat and infolog, and ultimately being a cause of desync, which is the big issue, 'specially for backwards compatibility / lazy modders Rolling Eyes
Actually it DID possibly cause desync/segfault. I FIXED IT.
According to submarine the latest SVN no longer bitches about it anyway. Laughing Mad
The checking code is still there, no one changed it.
http://spring.clan-sy.com/fisheye/brows ... /Units/COB

So I guess you fixed all scripts or submarine failed at testing :P
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Actually it DID possibly cause desync/segfault. I FIXED IT.
Ah. Well, I assumed that it was causing problems once it was expected by the patch accessing the variable's state, not that it was causing problems and we just hadn't seen it until you were investigating desync. Just my misunderstanding, frankly.
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Post by Noruas »

This is going to be a problem in every game / mod that doesn't provide a pitch parameter to all mobile builders (iow, the vast majority). It's just the way that Spring now expects COBs to return this. Probably should default to a value of 0, instead of creating a stack error, but meh, that's what's going on.
Aww Hell.
You just gave me more stuff to do. :(
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Something is borked with unit sounds in SVN. Weapons are unaffected. Any ideas where I should be looking?
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

Looks like S'44 svn is down (along with the rest of bountysource). I wanted to commit some model changes (mainly Long Tom), now I cannot do this.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Bountysource is being a total pain atm. It's back up, I just comitted the fix for the sounds (Peet spotted an error message I totally missed. I need to sleep more and drink less.)
Post Reply

Return to “Game Development”