Advertisement
Baoulettes

such code

May 20th, 2022
847
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.85 KB | None | 0 0
  1. //z_play.c:
  2. //=========================================================================================
  3.     if (CVar_GetS32("gKeepMask", 0) != 0) {
  4.         if (CVar_GetS32("gNoRestrictAge", 0) != 0) {
  5.             if (gSaveContext.fileNum == 1) {
  6.                 CVar_SetS32("gMaskNum", player->currentMask);
  7.             } else if (gSaveContext.fileNum == 2) {
  8.                 CVar_SetS32("gMaskNum_2", player->currentMask);
  9.             } else if (gSaveContext.fileNum == 3) {
  10.                 CVar_SetS32("gMaskNum_3", player->currentMask);
  11.             } else {
  12.                 CVar_SetS32("gMaskNum_debug", player->currentMask);
  13.             }
  14.         } else {
  15.             if (gSaveContext.fileNum == 1 && LINK_AGE_IN_YEARS == LINK_IS_CHILD) {
  16.                 CVar_SetS32("gMaskNum", player->currentMask);
  17.             } else if (gSaveContext.fileNum == 2 && LINK_AGE_IN_YEARS == LINK_IS_CHILD) {
  18.                 CVar_SetS32("gMaskNum_2", player->currentMask);
  19.             } else if (gSaveContext.fileNum == 3 && LINK_AGE_IN_YEARS == LINK_IS_CHILD) {
  20.                 CVar_SetS32("gMaskNum_3", player->currentMask);
  21.             } else if (LINK_AGE_IN_YEARS == LINK_IS_CHILD) {
  22.                 CVar_SetS32("gMaskNum_debug", player->currentMask);
  23.             }
  24.         }
  25.     }
  26.  
  27. //z_player_lib.c
  28. //=========================================================================================
  29.         if (CVar_GetS32("gKeepMask", 0) != 0) {
  30.             if (CVar_GetS32("gNoRestrictAge", 0) != 0) {
  31.                 if (gSaveContext.fileNum == 1) {
  32.                     this->currentMask = CVar_GetS32("gMaskNum", 0);
  33.                 } else if (gSaveContext.fileNum == 2) {
  34.                     this->currentMask = CVar_GetS32("gMaskNum_2", 0);
  35.                 } else if (gSaveContext.fileNum == 3) {
  36.                     this->currentMask = CVar_GetS32("gMaskNum_3", 0);
  37.                 } else {
  38.                     this->currentMask = CVar_GetS32("gMaskNum_debug", 0);
  39.                 }
  40.             } else {
  41.                 if (gSaveContext.fileNum == 1 && LINK_AGE_IN_YEARS == LINK_IS_CHILD) {
  42.                     this->currentMask = CVar_GetS32("gMaskNum", 0);
  43.                 } else if (gSaveContext.fileNum == 2 && LINK_AGE_IN_YEARS == LINK_IS_CHILD) {
  44.                     this->currentMask = CVar_GetS32("gMaskNum_2", 0);
  45.                 } else if (gSaveContext.fileNum == 3 && LINK_AGE_IN_YEARS == LINK_IS_CHILD) {
  46.                     this->currentMask = CVar_GetS32("gMaskNum_3", 0);
  47.                 } else if (gSaveContext.fileNum != 1 && gSaveContext.fileNum != 2 && gSaveContext.fileNum != 3 && LINK_AGE_IN_YEARS == LINK_IS_CHILD) {
  48.                     this->currentMask = CVar_GetS32("gMaskNum_debug", 0);
  49.                 } else if (LINK_AGE_IN_YEARS != LINK_IS_CHILD) {
  50.                     this->currentMask = PLAYER_MASK_NONE;
  51.                 }
  52.             }
  53.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement