comparison mm7_4.cpp @ 816:cfc65feef029

* Player Recovery Times * Player Attack fixes * Debug log to timers
author Nomad
date Tue, 26 Mar 2013 12:40:27 +0200
parents 7bb33867d2cb
children 9359c114f98c
comparison
equal deleted inserted replaced
813:d37b03507b3b 816:cfc65feef029
2375 Player *v14; // esi@35 2375 Player *v14; // esi@35
2376 double v15; // st7@35 2376 double v15; // st7@35
2377 Player **v16; // esi@43 2377 Player **v16; // esi@43
2378 Player *v17; // edi@44 2378 Player *v17; // edi@44
2379 double v18; // st7@44 2379 double v18; // st7@44
2380 float v19; // ST28_4@48 2380 //float v19; // ST28_4@48
2381 double v20; // ST38_8@48 2381 //double v20; // ST38_8@48
2382 Player *v21; // esi@51 2382 Player *v21; // esi@51
2383 signed int v22; // edi@53 2383 signed int v22; // edi@53
2384 int v23; // eax@59 2384 int v23; // eax@59
2385 int v24; // ecx@60 2385 int v24; // ecx@60
2386 int v25; // eax@63 2386 int v25; // eax@63
2416 //unsigned int v55; // [sp-8h] [bp-38h]@18 2416 //unsigned int v55; // [sp-8h] [bp-38h]@18
2417 unsigned int v56; // [sp-8h] [bp-38h]@55 2417 unsigned int v56; // [sp-8h] [bp-38h]@55
2418 //int v57; // [sp-4h] [bp-34h]@18 2418 //int v57; // [sp-4h] [bp-34h]@18
2419 int v58; // [sp-4h] [bp-34h]@33 2419 int v58; // [sp-4h] [bp-34h]@33
2420 int v59; // [sp-4h] [bp-34h]@55 2420 int v59; // [sp-4h] [bp-34h]@55
2421 unsigned int v60; // [sp+10h] [bp-20h]@1 2421 //unsigned int v60; // [sp+10h] [bp-20h]@1
2422 unsigned int v61; // [sp+14h] [bp-1Ch]@1 2422 unsigned int v61; // [sp+14h] [bp-1Ch]@1
2423 Player **v62; // [sp+14h] [bp-1Ch]@50 2423 Player **v62; // [sp+14h] [bp-1Ch]@50
2424 //unsigned int a2; // [sp+18h] [bp-18h]@1 2424 //unsigned int a2; // [sp+18h] [bp-18h]@1
2425 signed int a2a; // [sp+18h] [bp-18h]@47 2425 signed int a2a; // [sp+18h] [bp-18h]@47
2426 signed int v65; // [sp+1Ch] [bp-14h]@47 2426 signed int v65; // [sp+1Ch] [bp-14h]@47
2427 2427
2428 //a2 = pParty->uCurrentHour; 2428 //a2 = pParty->uCurrentHour;
2429 v61 = pParty->uDaysPlayed; 2429 v61 = pParty->uDaysPlayed;
2430 v60 = pEventTimer->uTimeElapsed; 2430 //auto prev_time = pEventTimer->uTimeElapsed;
2431 pParty->uTimePlayed += pEventTimer->uTimeElapsed; 2431 pParty->uTimePlayed += pEventTimer->uTimeElapsed;
2432 v0 = (signed __int64)(pParty->uTimePlayed * 0.234375) / 60; 2432 v0 = (signed __int64)(pParty->uTimePlayed * 0.234375) / 60;
2433 v1 = v0; 2433 v1 = v0;
2434 v0 /= 60i64; 2434 v0 /= 60i64;
2435 v2 = v0; 2435 v2 = v0;
2545 } 2545 }
2546 while ( (signed int)v16 <= (signed int)&pPlayers[4] ); 2546 while ( (signed int)v16 <= (signed int)&pPlayers[4] );
2547 } 2547 }
2548 _493938_regenerate(); 2548 _493938_regenerate();
2549 v65 = 4; 2549 v65 = 4;
2550 a2a = v60; 2550 a2a = pEventTimer->uTimeElapsed;
2551 if ( pParty->uFlags2 & 2 ) 2551 if ( pParty->uFlags2 & PARTY_FLAGS_2_RUNNING )
2552 { 2552 {
2553 v19 = (double)(signed int)v60 * 0.5; 2553 //v19 = (double)(signed int)prev_time * 0.5;
2554 v20 = v19 + 6.7553994e15; 2554 //v20 = v19 + 6.7553994e15;
2555 a2a = LODWORD(v20); 2555 a2a *= 0.5f;
2556 if ( SLODWORD(v20) <= 0 ) 2556 if (a2a < 1)
2557 a2a = 1; 2557 a2a = 1;
2558 } 2558 }
2559 v62 = &pPlayers[1]; 2559 v62 = &pPlayers[1];
2560 do 2560 do
2561 { 2561 {
2579 v21->SetCondition(v56, v59); 2579 v21->SetCondition(v56, v59);
2580 LABEL_59: 2580 LABEL_59:
2581 v23 = (int)&v21->field_E0; 2581 v23 = (int)&v21->field_E0;
2582 if ( v21->field_E0 ) 2582 if ( v21->field_E0 )
2583 { 2583 {
2584 v24 = *(int *)v23 - v60; 2584 v24 = *(int *)v23 - pEventTimer->uTimeElapsed;
2585 if ( v24 > 0 ) 2585 if ( v24 > 0 )
2586 { 2586 {
2587 *(int *)v23 = v24; 2587 *(int *)v23 = v24;
2588 } 2588 }
2589 else 2589 else
2593 } 2593 }
2594 } 2594 }
2595 v25 = (int)&v21->field_E4; 2595 v25 = (int)&v21->field_E4;
2596 if ( v21->field_E4 ) 2596 if ( v21->field_E4 )
2597 { 2597 {
2598 v26 = *(int *)v25 - v60; 2598 v26 = *(int *)v25 - pEventTimer->uTimeElapsed;
2599 if ( v26 > 0 ) 2599 if ( v26 > 0 )
2600 { 2600 {
2601 *(int *)v25 = v26; 2601 *(int *)v25 = v26;
2602 } 2602 }
2603 else 2603 else
2607 } 2607 }
2608 } 2608 }
2609 v27 = (int)&v21->field_E8; 2609 v27 = (int)&v21->field_E8;
2610 if ( v21->field_E8 ) 2610 if ( v21->field_E8 )
2611 { 2611 {
2612 v28 = *(int *)v27 - v60; 2612 v28 = *(int *)v27 - pEventTimer->uTimeElapsed;
2613 if ( v28 > 0 ) 2613 if ( v28 > 0 )
2614 { 2614 {
2615 *(int *)v27 = v28; 2615 *(int *)v27 = v28;
2616 } 2616 }
2617 else 2617 else
2621 } 2621 }
2622 } 2622 }
2623 v29 = (int)&v21->field_EC; 2623 v29 = (int)&v21->field_EC;
2624 if ( v21->field_EC ) 2624 if ( v21->field_EC )
2625 { 2625 {
2626 v30 = *(int *)v29 - v60; 2626 v30 = *(int *)v29 - pEventTimer->uTimeElapsed;
2627 if ( v30 > 0 ) 2627 if ( v30 > 0 )
2628 { 2628 {
2629 *(int *)v29 = v30; 2629 *(int *)v29 = v30;
2630 } 2630 }
2631 else 2631 else
2635 } 2635 }
2636 } 2636 }
2637 v31 = (int)&v21->field_F0; 2637 v31 = (int)&v21->field_F0;
2638 if ( v21->field_F0 ) 2638 if ( v21->field_F0 )
2639 { 2639 {
2640 v32 = *(int *)v31 - v60; 2640 v32 = *(int *)v31 - pEventTimer->uTimeElapsed;
2641 if ( v32 > 0 ) 2641 if ( v32 > 0 )
2642 { 2642 {
2643 *(int *)v31 = v32; 2643 *(int *)v31 = v32;
2644 } 2644 }
2645 else 2645 else
2649 } 2649 }
2650 } 2650 }
2651 v33 = (int)&v21->field_F4; 2651 v33 = (int)&v21->field_F4;
2652 if ( v21->field_F4 ) 2652 if ( v21->field_F4 )
2653 { 2653 {
2654 v34 = *(int *)v33 - v60; 2654 v34 = *(int *)v33 - pEventTimer->uTimeElapsed;
2655 if ( v34 > 0 ) 2655 if ( v34 > 0 )
2656 { 2656 {
2657 *(int *)v33 = v34; 2657 *(int *)v33 = v34;
2658 } 2658 }
2659 else 2659 else
2663 } 2663 }
2664 } 2664 }
2665 v35 = (int)&v21->field_F8; 2665 v35 = (int)&v21->field_F8;
2666 if ( v21->field_F8 ) 2666 if ( v21->field_F8 )
2667 { 2667 {
2668 v36 = *(int *)v35 - v60; 2668 v36 = *(int *)v35 - pEventTimer->uTimeElapsed;
2669 if ( v36 > 0 ) 2669 if ( v36 > 0 )
2670 { 2670 {
2671 *(int *)v35 = v36; 2671 *(int *)v35 = v36;
2672 } 2672 }
2673 else 2673 else
2677 } 2677 }
2678 } 2678 }
2679 v37 = (int)&v21->field_FC; 2679 v37 = (int)&v21->field_FC;
2680 if ( v21->field_FC ) 2680 if ( v21->field_FC )
2681 { 2681 {
2682 v38 = *(int *)v37 - v60; 2682 v38 = *(int *)v37 - pEventTimer->uTimeElapsed;
2683 if ( v38 > 0 ) 2683 if ( v38 > 0 )
2684 { 2684 {
2685 *(int *)v37 = v38; 2685 *(int *)v37 = v38;
2686 } 2686 }
2687 else 2687 else
2691 } 2691 }
2692 } 2692 }
2693 v39 = (int)&v21->field_100; 2693 v39 = (int)&v21->field_100;
2694 if ( v21->field_100 ) 2694 if ( v21->field_100 )
2695 { 2695 {
2696 v40 = *(int *)v39 - v60; 2696 v40 = *(int *)v39 - pEventTimer->uTimeElapsed;
2697 if ( v40 > 0 ) 2697 if ( v40 > 0 )
2698 { 2698 {
2699 *(int *)v39 = v40; 2699 *(int *)v39 = v40;
2700 } 2700 }
2701 else 2701 else
2705 } 2705 }
2706 } 2706 }
2707 v41 = (int)&v21->field_104; 2707 v41 = (int)&v21->field_104;
2708 if ( v21->field_104 ) 2708 if ( v21->field_104 )
2709 { 2709 {
2710 v42 = *(int *)v41 - v60; 2710 v42 = *(int *)v41 - pEventTimer->uTimeElapsed;
2711 if ( v42 > 0 ) 2711 if ( v42 > 0 )
2712 { 2712 {
2713 *(int *)v41 = v42; 2713 *(int *)v41 = v42;
2714 } 2714 }
2715 else 2715 else