Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Buying Back Dead Buildings
Re: Buying Back Dead Buildings [message #315392 is a reply to message #315349] Mon, 04 February 2008 08:24 Go to previous messageGo to previous message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma:
General (4 Stars)
reborn wrote on Mon, 04 February 2008 02:24

Yrr wrote on Sun, 03 February 2008 20:04

reborn wrote on Mon, 04 February 2008 01:32

Yrr wrote on Sun, 03 February 2008 18:40

reborn wrote on Sun, 03 February 2008 23:16

Yrr wrote on Sun, 03 February 2008 17:00

Get Resurrection, enable revivable buildings in configuration and attach script RR_ReviveBuilding to the building to revive it.


Please can you explain how that works in depth? Did you actually manage find the right calls and update the client or have you done it some other way?
Please can you explain it with detail?


Since a real revive for normal Renegade users is impossible, RR does it like that:

On building destruction, it sends the following information to non-RR clients instead of sending the destruction:
- set health to 1hp
- turn power off

So non-RR clients can still target the building and it is not darkened, but from inside it looks like destroyed ans there is no health bar.

RR-clients have a client-side fix to allow resurrectable buildings so they see buildings destroyed as usual.

Once RR revives a building, it sets health to 50%, enables power, reinitializes it, re-attaches preset scripts and for AGT and Obelisk, it re-initializes their turrets.

Took me some days to make all that work correctly.


It can be used easily soon, since I'm currently a plugin system for RR, and there you only have to use building.revive();



That's pretty cool. But how do you make the Purchase terminal appear "disabled" for the non-rr clients when a building is supposed to be dead?
Also, how do you make the clients see the prices doubled for when the power plant is supposed to be dead, but really it's just had it's health set to 1?

v00d00 also said it was impossible to make clients update the purchase terminal without rejoining the server, however, I also heard that Silent Kane manged it server-side. Perhaps it was a Chinese whisper :-/


- The PP multiplier is simple since disabling the PP's power has the same effect.
- The terminals are not disabled as usual. Non-RR clients can still enter the soldier and the vehicle purchase menu. But all soldiers and vehicles in these windows are disabled. That can be set server-side even without destroying any building.

Since the buildings are never destroyed for non-RR clients, there is no problem with joining or having to rejoin.



Ah OK, I didn't realise turning the power off for the PP had that effect, I never noticed before. Thankyou.
It would be nice to actually show the purchase terminal as destroyed, but I guess that's as close as you're going to get it.

Using the same method it should be possible to replicate this in the renegade API for non-rr server owners. I might give it a go.

intersting ...info....
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: need file name
Next Topic: Predator Stealth?
Goto Forum:
  


Current Time: Tue Feb 18 21:43:38 MST 2025

Total time taken to generate the page: 0.01028 seconds