-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or requestmoddedIssues or features related to modifications of GothicIssues or features related to modifications of Gothic
Description
Here some code example to illustrate:
func void FADEOUTFINISH() {
var OCNPC HER; <---- OCNPC!
if (FF_ACTIVE(FADESCREENTOBLACKLOOP)) {
FF_REMOVE(FADESCREENTOBLACKLOOP);
};
FADESCREENSTATE = 0;
SCREENFADED = TRUE;
if (FADESCREENWORLDCHANGE) {
HER = HLP_GETNPC(HERO); <----- implicit cast!
HER.BITFIELD[0] = HER.BITFIELD[0] & ~OCNPC_BITFIELD0_MOVLOCK;
....
FADESCREENCHANGEWORLD();
};
};
or
func void TELEPORTHEROTOPOS(var int X, var int Y, var int Z) {
var OCNPC HER;
HER = HLP_GETNPC(HERO);
HER._ZCVOB_TRAFOOBJTOWORLD[3] = X;
HER._ZCVOB_TRAFOOBJTOWORLD[7] = Y;
HER._ZCVOB_TRAFOOBJTOWORLD[11] = Z;
};
Keeping discussion open for now; however my current idea is to:
- implement type-check for 'default' VM mode - it should throw exception, if
C_Npcis assigned toOCNPCor any other non-compatible type. - have 'special' mode, when instead of exception callback is called. It's reproducibility of callback to handle conversion. In those examples fro
npctozenkit::DaedalusTransientInstanceand vise-versa.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestmoddedIssues or features related to modifications of GothicIssues or features related to modifications of Gothic