PDA

View Full Version : magic bridgebuilders



php
25th February 2014, 00:38
just chilling with kung when we figured out we are magic bridgebuilders wow mage such magic very wow :eek:

maybe we are the bridge between the spirit world and the real world, maybe i'm.. the AVATAR and kung is one of my previous lifes very wow such believe

or its just a spooky stairway to heaven kung dont go so far on staircase noooooooo

jk u guys r fine

http://killtube.org/downloads/php/bridge_1.jpg
http://killtube.org/downloads/php/bridge_2.jpg
http://killtube.org/downloads/php/bridge_3.jpg
http://killtube.org/downloads/php/bridge_4.jpg
http://killtube.org/downloads/php/php_1.jpg
http://killtube.org/downloads/php/php_2.jpg

YuriJurek
25th February 2014, 00:48
Must've been a great party man! Wonder why we didn't get an invitation;x

kung foo man
25th February 2014, 01:40
awww ;x

Wasn't organized like a party :D

More images: http://killtube.org/downloads/php/



// algo by IzNoGod
// needs CoDExtended: https://github.com/riicchhaarrd/CoDExtended

monitor() {
setcvar("sp_radius", 68); //68
setcvar("sp_height_per_unit", 17); //17
setcvar("sp_units_per_turn", 8); //8
self.crates = [];
while(self.sessionstate == "playing") {
if(self useButtonPressed()) {
start = self.origin;
units_per_omwenteling = getcvarint("sp_units_per_turn");//8;
hoogte_per_unit = getcvarint("sp_height_per_unit");//20;
radius = getcvarint("sp_radius");//50;
max_units = 100;
for(i = 0; i < max_units; i++) {
h = i * hoogte_per_unit + start[2];
hoe_ver = i%units_per_omwenteling;
graden = 360 * hoe_ver/units_per_omwenteling;
x = start[0] + radius * cos(graden);
y = start[1] + radius * sin(graden);
//spawnjeunit((x,y,h));

e = spawn("script_model", (x,y,h));
e setModel("xmodel/crate_misc1");
e setbounds(30,30);
e.angles = vectortoangles((e.origin[0] - start[0], e.origin[1] - start[1], 0));
//e.angles = vectortoangles(self.origin - pos);
e setContents(33554432); //CONTENTS_BODY
self.crates[self.crates.size] = e;
iprintln(self.crates.size + " crates.");
}
wait 1;
} else if(self meleeButtonPressed() || self.crates.size > 950) {
for(i = 0; i < self.crates.size; i++)
self.crates[i] delete();
self.crates = [];
wait 1;
}
wait .05;
}
}

Tally
25th February 2014, 09:05
How are the crates sold? High LOD detail? Or where you setting contents = 1?

Ni3ls
25th February 2014, 10:14
"e setContents(33554432); //CONTENTS_BODY"

php
25th February 2014, 10:53
The contents I've set to 0x2000000 aka 33554432 because that's CONTENTS_BODY which basically means, you can't get in (solid), but if you were inside you can freely walk out of it.


setbounds(30,30);
Is the main part which sets the bounds of the model, after that I'm linking the entity so the client doesn't have problems with the predict (setContents calls SV_LinkEntity at the end of the function, you have to call SV_LinkEntity everytime you change a origin, angle or bounds and more.)

I've had this ages ago if you can't find it on the github it's because I've updated the core of CoDExtended and didn't port all the functionality yet (it's still on github in the old versions, maybe hard to spot). The offsets for CoD2 remain the same (I've checked).

https://github.com/riicchhaarrd/CoDExtended/blob/master/CoDExtended/Linux/CoDExtended.cpp

in void entitygsc(int cmd, int a1) {
search for

case 16: {
int width, height;
stackGetParamInt(2, &width);
stackGetParamInt(3, &height);
*(float*)(GENTITY_SIZE * a1 + gentities + 280) = height;
*(float*)(GENTITY_SIZE * a1 + gentities + 276) = width;
*(float*)(GENTITY_SIZE * a1 + gentities + 272) = width;
*(float*)(GENTITY_SIZE * a1 + gentities + 264) = -width;
*(float*)(GENTITY_SIZE * a1 + gentities + 260) = -width;
//syscall(53, (int*)(GENTITY_SIZE * a1 + gentities));
}
break;

Also the script for the bridge if anyone wants it the script Kung posted was the spiral



monitor() {
self.crates = [];
while(self.sessionstate == "playing") {
if(self useButtonPressed()) {
if(self.crates.size < 950) {
eye = self geteye();
angle = self getplayerangles();
fw = anglestoforward(angle);
trace = bullettrace(eye, eye + maps\mp\_utility::vectorScale(fw, 10000), false, undefined);
pos = trace["position"];
dist = distance(pos, self.origin);
step = self.origin;
for(i = 0; i < (dist/30); i++) {
e = spawn("script_model", step);
e setModel("xmodel/crate_misc1");
e setbounds(30,30);
e.angles = vectortoangles(self.origin - pos);
e setContents(33554432); //CONTENTS_BODY
step = step + maps\mp\_utility::vectorScale(anglestoforward(angl e), 30);
self.crates[self.crates.size] = e;
}
iprintln(self.crates.size + " crates ingame.");
}
wait 1;
} else if(self meleeButtonPressed()) {
for(i = 0; i < self.crates.size; i++)
self.crates[i] delete();
self.crates = [];
wait 1;
}
wait .05;
}
}


Thanks to IzNoGod for doing the math for the spiral
Also images of the spiral

http://killtube.org/downloads/php/spiral.png
http://killtube.org/downloads/php/spiral_1.jpg
http://killtube.org/downloads/php/spiral_2.jpg
http://killtube.org/downloads/php/spiral_3.jpg
http://killtube.org/downloads/php/spiral_4.jpg
http://killtube.org/downloads/php/spiral_5.jpg

Tally
25th February 2014, 11:48
I knew that solid models were possible in vCOD because before the 1.3 patch, the radio models in Headquarters gametype were solid. However, because players could get inside the contents and become stuck, Infinity Ward removed the feature in the 1.3 patch. Are you running vCOD 1.2 or is the bounded box contents still accessible after the 1.3 patch?

php
25th February 2014, 12:22
I've only tested this with the 1.1 and 1.5 patch because I mainly play 1.5

Mitch
25th February 2014, 14:08
I've only tested this with the 1.1 and 1.5 patch because I mainly play 1.5

it works on cod2 1.3.

657

Tally
25th February 2014, 15:31
it works on cod2 1.3.

It's long been known to work on COD2. All versions.

php
25th February 2014, 15:39
it works on cod2 1.3.

657

Please read my previous posts;

I've had this ages ago if you can't find it on the github it's because I've updated the core of CoDExtended and didn't port all the functionality yet (it's still on github in the old versions, maybe hard to spot). The offsets for CoD2 remain the same (I've checked).

kung foo man
2nd March 2014, 18:33
Does even the setBounds() work, which makes the bridge smooth to walk on? I have just the setContents() effect (round ball without client prediction) in CoD2 1.2 :S

Tally
2nd March 2014, 18:40
Does even the setBounds() work, which makes the bridge smooth to walk on? I have just the setContents() effect (round ball without client prediction) in CoD2 1.2 :S

setBonds() is an unknown function in COD2, if that was what you were asking. But setBonds() is still a built-in function for COD1/UO.

kung foo man
2nd March 2014, 18:51
Yea, it's integrated in libcod for that reason :D



void gsc_entity_setbounds(int id) {
float width, height;

if ( ! stackGetParams("ff", &width, &height)) {
printf("scriptengine> ERROR: please specify width and height to gsc_entity_setbounds()\n");
stackPushUndefined();
return;
}

*(float*)(gentities + gentities_size*id + 280) = height;
*(float*)(gentities + gentities_size*id + 276) = width;
*(float*)(gentities + gentities_size*id + 272) = width;
*(float*)(gentities + gentities_size*id + 264) = -width;
*(float*)(gentities + gentities_size*id + 260) = -width;

printf("id=%d height=%f width=%f\n", id, height, width);
stackReturnInt(1);
}


I want this to work to release a new version, which cleans up alot of old mess (closer which depends on std\-functions and quite some bloat code).


Edit: to destroy false hopes, it never worked as good as in CoD 1