Tremulous Forum

Mods => Modding Center => Topic started by: vcxzet on December 29, 2006, 11:11:32 pm

Title: compability note
Post by: vcxzet on December 29, 2006, 11:11:32 pm
backporting patch works till svn 879
https://bugzilla.icculus.org/show_bug.cgi?id=2907

for 880+ you will need something else to make your mod compatible with 1.1.0
Title: Re: compability note
Post by: Risujin on December 30, 2006, 03:08:02 am
Quote from: "vcxzet"
backporting patch works till svn 879
https://bugzilla.icculus.org/show_bug.cgi?id=2907

for 880+ you will need something else to make your mod compatible with 1.1.0

Its gonna get ugly from here on out. Timbo extended generic1 because he couldnt cram whatever hes adding into the struct. Whatever backporting patch would be made would have to not only remove the extended variable size but whatever this new feature is too.
Title: Re: compability note
Post by: Vector_Matt on December 30, 2006, 03:30:45 am
Quote from: "Risujin"
Its gonna get ugly from here on out. Timbo extended generic1 because he couldnt cram whatever hes adding into the struct. Whatever backporting patch would be made would have to not only remove the extended variable size but whatever this new feature is too.
Or the devs could release 1.1.1 or 1.2.0 and not have to worry about backporting.
Title: Re: compability note
Post by: Risujin on December 31, 2006, 08:34:09 pm
Quote from: "Vector_Matt"
Or the devs could release 1.1.1 or 1.2.0 and not have to worry about backporting.

They're in the middle of doing something ugly to the buildables system, NOT a good time to release. :)
Title: compability note
Post by: vcxzet on January 01, 2007, 01:09:29 pm
ok somehow I accomplished compability
first applied my backporting patch
then changed bg_bublic.c

- #define B_HEALTH_BITS       12
- #define B_HEALTH_MASK       ((1<<B_HEALTH_BITS)-1)

- #define B_MARKED_TOGGLEBIT  0x00001000
- #define B_SPAWNED_TOGGLEBIT 0x00002000
- #define B_POWERED_TOGGLEBIT 0x00004000
- #define B_DCCED_TOGGLEBIT   0x00008000

+ #define B_HEALTH_BITS       4
+ #define B_HEALTH_MASK       ((1<<B_HEALTH_BITS)-1)

+ #define B_MARKED_TOGGLEBIT  0x00000010
+ #define B_SPAWNED_TOGGLEBIT 0x00000020
+ #define B_POWERED_TOGGLEBIT 0x00000040
+ #define B_DCCED_TOGGLEBIT   0x00000080

---- and it worked :/ BUT 4bit is not sufficient for buildable health
if you wont use mark decon feature you can use

+ #define B_HEALTH_BITS       5
+ #define B_HEALTH_MASK       ((1<<B_HEALTH_BITS)-1)

+ #define B_MARKED_TOGGLEBIT  0x00000000
+ #define B_SPAWNED_TOGGLEBIT 0x00000020
+ #define B_POWERED_TOGGLEBIT 0x00000040
+ #define B_DCCED_TOGGLEBIT   0x00000080

AFAIK those bits are for clients only
so in the first one client can see X near buildables
in the second one client cant see X
BUT I believe in both cases player can mark them
but it sucks at client side
Title: Re: compability note
Post by: Vector_Matt on January 01, 2007, 02:50:42 pm
Quote from: "Risujin"
They're in the middle of doing something ugly to the buildables system, NOT a good time to release. :)
Doing what to the buildables? They seemed fine to me.
Title: compability note
Post by: vcxzet on January 01, 2007, 02:52:11 pm
https://bugzilla.icculus.org/show_bug.cgi?id=2907
dont worry be happy

https://bugzilla.icculus.org/attachment.cgi?id=1231
Title: compability note
Post by: Risujin on January 01, 2007, 05:48:46 pm
Ah, vcx good work as always. :)

The mark buildable feature, to see the X, requires new cgame or a new client (!)? This is not a good thing to have if you can't see the Xs...

If its a cgame thing, perhaps we can bitpack that somewhere Timbo couldn't? ;)
Title: compability note
Post by: vcxzet on January 01, 2007, 06:23:43 pm
no client needed for X signs
if you want 4 bits for buildable health that client will see
(it was 5 before but timbo rised it to 12 since it was not sufficient
so 4 is not near being good)
to use 12 bits you need new client
marking is server side even if client dont see the mark X
he will be marking anyway

edit.
you need 4 bits for mark,spawn,dcc,power
and 4 bits left for health since generic1 is 8 bits
I wonder what dcc bit is used for :/
Title: compability note
Post by: Risujin on January 01, 2007, 10:17:44 pm
Quote from: "vcxzet"
you need 4 bits for mark,spawn,dcc,power

... and whats spawn for? I'm quite sure this sort of thing can be bitpacked without a larger generic1...
Title: compability note
Post by: vcxzet on January 01, 2007, 10:19:21 pm
Quote from: "Risujin"
Quote from: "vcxzet"
you need 4 bits for mark,spawn,dcc,power

... and whats spawn for? I'm quite sure this sort of thing can be bitpacked without a larger generic1...

spawned flag
if you kill it you will see building animation for buildables
Title: compability note
Post by: vcxzet on January 10, 2007, 12:38:29 am
Quote from: "vcxzet"
https://bugzilla.icculus.org/show_bug.cgi?id=2907
dont worry be happy

https://bugzilla.icculus.org/attachment.cgi?id=1231

after applying it
change bg_bublic.h as below
Code: [Select]
#define B_MARKED_TOGGLEBIT  0x00000080
#define B_SPAWNED_TOGGLEBIT 0x00000020
#define B_POWERED_TOGGLEBIT 0x00000040
#define B_DCCED_TOGGLEBIT   0x00000000
Title: compability note
Post by: Risujin on January 10, 2007, 05:22:44 am
All hail vcxzet! :tyrant:

I will try this on Balance in the morning...